On Linux, when one of the IServer ports(by default they are 34952, 34962, 39321, 39320) is occupied by other processes(external or child process), IServer will fail to start up. Checking the DSSErrors.log, we will find such error message “Server failed to start up due to the error: MSINetServer: Port XXXX is already in use”. For example, the error message is “Server failed to start up due to the error: MSINetServer: Port 34952 is already in use“ when port 34952 is occupied by other processes.
On Linux, many Linux kernels use the port range 32768–60999(Ephemeral port ) as the default ephemeral port range. Since the default IServer ports 34952, 34962, 39321, 39320 are all within the range, these ports can be chosen by any processes as the client port to communicate with a server. Before IServer starts, if one of the ports is already used by another process, the server can not start due to the required port being in use.
We will provide two solutions to protect the IServer ports from being occupied by other processes.
In order to make the change, we can just execute the command sysctl net.ipv4.ip_local_reserved_ports=”34952,34962,39321,39320” in a Linux terminal.
Note: In the above command, no space between the ports, just a comma.
We can make the change by the command sysctl net.ipv4.ip_local_port_range="40000 65535". It will adjust the ephemeral port range to 40000-65535. Since then, all of the processes will choose a port within this range as the client port to connect to its server.
Note:
For both solution 1 and solution 2:
Please do the change before starting IServer.
The change of OS Kernel setting will take effect instantly. But if the machine is restarted, the setting will recover to the default value. So please redo the modification per the machine restart.
If we want to make the change effective permanently, we should edit the system file /etc/system.conf manually with root. Edit the file /etc/system.conf, append the lines
net.ipv4.ip_local_port_range=40000 65535
net.ipv4.ip_local_reserved_ports=34952,34962,39321,39320
in it.
The content of the file looks like follows
Content in /etc/system.conf
Then activate the modification by the command
sysctl -p
It will load in the new sysctl settings from the file /etc/sysctl.conf and active them.
You can verify the activation by the commands
cat /proc/sys/net/ipv4/ip_local_reserved_ports
and
cat /proc/sys/net/ipv4/ip_local_port_range
respectively.
Both solution 1 and 2 will solve the IServer ports occupation issue. Please choose the proper one according to your preference