NAV

Resolving Binding Errors

When your SimpleHelp server launches it reads the configuration file called serverconfig.xml (located in the configuration directory) and tries to bind to all the TCP/UDP ports specified in that file. These are typically chosen automatically when you install and are edited manually if necessary via the Administration tab in the Technician Console.

Only one application can use a port directly on a particular network address. If other software is already using a specified port then SimpleHelp will be unable to utilise that port. When SimpleHelp starts it will log any critical launch errors in the log file called server.log. If you received an error such as"Failed to bind to port" or "Address already in use" then it can be caused by one or more of the following:

  • Some other software is already bound to the ports that SimpleHelp is configured to use.
  • The SimpleHelp server does not have permissions to bind to the ports that it is configured to use.

It is possible to run two applications on the same port if they each bind to different IP addresses. For example, if server has two IP addresses (192.168.0.2 and 192.168.0.3) then SimpleHelp can be configured to use one of these addresses, leaving the second application to use the other. You can configure IP associations in the Administration Tab.

Identifying Applications on Windows

On Windows you can run the following command in a Command Prompt window to display all the applications using local ports:

netstat -aon

The output produced will be similar to the following snippet:

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       1480
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       796
  TCP    0.0.0.0:222            0.0.0.0:0              LISTENING       1480
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       1480
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:15100          0.0.0.0:0              LISTENING       1968
  TCP    0.0.0.0:15101          0.0.0.0:0              LISTENING       1968
  TCP    0.0.0.0:49152          0.0.0.0:0              LISTENING       456
  TCP    0.0.0.0:49153          0.0.0.0:0              LISTENING       864

Each row represents a local port in use. Look for rows that have the LISTENING state and mention the port that SimpleHelp is configured to use. For example, the text (0.0.0.0:80) indicates that port 80 is in use on all local addresses by a process with process ID 1480. Note that the protocol here indicates that this is a TCP port. You can now use Task Manager to identify which application is 1480.

Identifying Applications on Linux

On Linux you can run the following command in a terminal window to display all the applications using local ports:

sudo netstat -apn

Note that super user privileges are required to show the processes bound to the ports. The output produced will be similar to the following snippet:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1317/sshd       
tcp        0      0 10.16.0.9:22            194.36.163.227:49463    ESTABLISHED 20251/sshd: root@no

Each row represents a local port in use. Look for rows that have the LISTENING state and mention the port that SimpleHelp is configured to use. For example, the text (0.0.0.0:22) indicates that port 22 is in use on all local addresses by a process with process ID 1317 (sshd). Note that the protocol here indicates that this is a TCP port.

Permissions to Use Ports on Linux

On Linux, macOS, BSD and other operating systems super user permissions are required to bind to low port numbers (usually ports under 1024). If SimpleHelp is configured to use ports 80 and 443 (for example) and the server is started without appropriate super user permissions then the server will be unable to bind to the specified ports. Relaunching the server using sudo or some other mechanism will resolve the issue.