TCP Port Numbers and TechDoc

TCP port numbers are used by applications running over TCP/IP to know how to find and talk with each other. TechDoc is accessed by end-users via the web, which normally uses ports 80 and/or 443. On the server side, the web server talks to Tomcat (the Java application server that TechDoc runs under) on two additional port numbers.

Prior to TechDoc 8, TechDoc used TCP ports 8005 or 8009 to talk between the web server and Tomcat. These happen to be the default ports for Tomcat and we have had a couple customers run into issues with other products that had Tomcat embedded in them and they were using the default ports too. For that reason, we have moved the port numbers in TechDoc 8 to 17973 and 17974.

So what happens if another application on your server is already using these ports. Like almost any computer problem, it depends. Tomcat may refuse to start or it may come up but the web server will report an error when you attempt to access TechDoc. So how do you troubleshoot this issue? If you log into the server as a Windows administrator, you can stop the Tomcat service and then check to see if any other application is using the port numbers shown above. If you don't know which port numbers to look for, open the file server.xml (located in \TechDoc\tomcat4iis\conf or \TechDoc\tomcat\conf depending on your version of TechDoc) and look for the two occurrences of port=. The command to display what ports are being used on your server is netstat -aon | more.

If you need to change the port numbers used by TechDoc, stop the IIS and Tomcat services. Edit server.xml and change the two occurrences of port= to use different port numbers that are greater than 1024 and not currently being used by your server. Use different values for each port attribute. Also, you should try to avoid the list of well-known port numbers to help avoid more collisions in the future. Make sure that you note the value of the second port number (the one that is in the Connector element of server.xml). You also need to edit (located in the same folder as server.xml) and change the value of worker.ajp13.port to match the Connector's port number. Finally, restart the IIS and Tomcat services and you should be back in business!