Defining a fixed TCP port

For processes that use TCP socket-based connections, you can define a fixed port instead of using the default randomly assigned port.

About this task

To avoid firewall issues or port conflicts, you might have to define a specific TCP port for a process. For example, you might need to do this if the helpers and the Helper Server, ncp_d_helpserv, are running on a different host to the Discovery engine, ncp_disco, and these hosts are behind a firewall. You might also need to define a fixed TCP port as part of failover configuration.

To define a fixed TCP port for a process, complete the following steps:

Procedure

  1. On the first server, start the process.
  2. Make a backup copy of the ServiceData.cfg file.
  3. Edit the ServiceData.cfg file and copy the line relevant to the process for which you want to define a port.

    The existing line might resemble the following example:

    SERVICE: Helper DOMAIN: DEMO ADDRESS: 192.168.31.8 PORT: 51153 SERVERNAME: britanicus DYNAMIC: YES

    In this example, DYNAMIC: YES shows that the port for the Helper Server has been assigned dynamically.

  4. Change the PORT setting to the required value.
  5. Change the string DYNAMIC:YES to DYNAMIC:NO. This forces the process to use the same address and port next time it starts.
  6. Save the ServiceData.cfg file.
  7. On the second server, make a backup copy of the ServiceData.cfg file.
  8. Copy the relevant line from the ServiceData.cfg file on the first server to the ServiceData.cfg file on the second server.
  9. Save the ServiceData.cfg file.