Setting up license servers, RSCM servers, DMS servers, etc..., they all require you to select an available port. Guessing just leads to frustration but fortunately, determining which ports are available is fairly simple. The netstat command works on both Windows and Linux and will show you which ports are in use and the processes that are using them. For example:

 

On Windows:

 

C:\>netstat -anu|more


Active Connections

 

 

 

  Proto  Local Address          Foreign Address        State           PID

 

  TCP    0.0.0.0:111            0.0.0.0:0              LISTENING       2856

 

  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       856

 

  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4

 

  TCP    0.0.0.0:902            0.0.0.0:0              LISTENING       2968

 

  TCP    0.0.0.0:912            0.0.0.0:0              LISTENING       2968

 

  TCP    0.0.0.0:1158           0.0.0.0:0              LISTENING       17196

 

-- More  --

 

 

More specifically, you can check if a particular port is in use:


 

C:\>netstat -ano | find /i "1718"

 

 

 

TCP    0.0.0.0:1718           0.0.0.0:0              LISTENING       2528

 

 

On Linux:

 

$ netstat -tulpn | grep 1717

tcp        0      0 0.0.0.0:1717                0.0.0.0:*                   LISTEN      21066/lmgrd       

$

 

Note: You'll need to be root to run netstat effectively.

 

 

Once you have this port usage information, you can make decisions about which ports you want your server processes to use.

 

Feel free to share your tips and ideas on this topic in the comments.