Port is Already in Use Error when Starting Server
The Alpha Anywhere Application Server cannot start if the server's Server Port is being used by another process.
Network services use TCP ports to "listen" for incoming requests from remote clients and service them. The combination of IP address and TCP port is what provides the unique address for your service, so only one process can use a given port at a time. When you attempt to start the Application Server, it will warn you if there is already some other program using the port it is configured to use and it will then abort starting. If this happens, you can either use a different port for the Application Server, or you can determine what other program is using the port and stop it.
If you are running the Development Application Server, changing the port used by the server is the easiest solution. Change the Server Port in the Application Server Control Panel and start the server. Specify a port that is not 80, such as 8080.
When you publish your application, you must include the chosen Server Port in as part of the URL that they access. For example, localhost:8080/myApplication/index.a5w
The Application Server cannot determine what other process is using a port on your computer for you. Windows provides tools you can uset to determine what process is using the port. Once you know the other process involved, you can determine whether it is providing a critical service or if it is safe to disable.
Follow the instructions below to determine the application using the port.
At a Windows command prompt, run the command netstat -o. This will output a list of ports, along with the PID (process ID) that has that port open. netstat should produce output similar to the example below:
C:\Documents and Settings\Administrator>netstat -o Active Connections Proto Local Address Foreign Address State PID TCP WEBAPPSERVER2:80 22.214.171.124:57434 TIME_WAIT 2636 TCP WEBAPPSERVER2:80 126.96.36.199:57589 TIME_WAIT 2636 TCP WEBAPPSERVER2:80 188.8.131.52:57600 TIME_WAIT 2636 TCP WEBAPPSERVER2:80 184.108.40.206:57608 TIME_WAIT 2636 TCP WEBAPPSERVER2:3389 220.127.116.11:6473 ESTABLISHED 964 TCP WEBAPPSERVER2:2325 192.168.0.13:netbios-ssn TIME_WAIT 0 C:\Documents and Settings\Administrator>
The sample output above indicates that the local port 80 is being used by process ID 2636. To determine the executable running as this process ID, you need to use Windows Task Manager.
Open Windows Task Manager. This can be done in the Windows command prompt. Run taskmgr in the command prompt.
C:\Documents and Settings\Administrator>taskmgr C:\Documents and Settings\Administrator>
Open the Processes tab.
Add PID (Process Identifier) to the columns displayed for the processes. Depending on the version of Windows Task Manager you are running, the PID column can be added by selecting Select Columns under the View menu.
If Select Columns is not listed under the View menu, right click on the title bar in the Process tab (as shown below) and select PID from the list of options.
Sort the process that are running by clicking on the PID heading. Find the PID that matches the PID using port 80 listed by netstat. The process in the Name column is the application using the port.
Applications that may be using port 80 include:
- Web Deploy
This list is not exahustive, but it does list applications frequently encountered using port 80. If Skype is installed on your system, it may try to use ports 80 and 443 for incoming connections.