I found the source of the problem, but not a way to solve it.
In the very first lines of code of the main module, the Self Service object sets the values of ServiceName, DisplayName and Description. The Self Service template allows you to define variables that are assigned to these properties for when the service is registered. In this case, I want the properties to use values from SQL, so before the Self Service properties are set, I added code in the global embed "Self Service - Initialize Varaibles" to read data from SQL. In here, I open a window with an OLE container to read SQL data using ADO. When I hardcode the results and don't do it through the window, the TCP/IP works. I also removed the OLE container and still open the window - not successful. Seems like the Clarion window that is opened first thing in the app causes the TCP/IP not to open.
Thys