If you are having problems launching a web server on a Windows Server, there might already be something running on port 80. Use the sequence below to find out what is running on port 80. Start with the netstat
command:
C:\Users\JBloggs>netstat -aon | findstr :80 TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 TCP 0.0.0.0:8081 0.0.0.0:0 LISTENING 1164 TCP [::]:80 [::]:0 LISTENING 4 TCP [::]:8081 [::]:0 LISTENING 1164 UDP 0.0.0.0:8082 *:* 1164 UDP [::]:8082 *:* 1164 C:\Users\JBloggs>
-a
displays all active connections.
The rightmost column give the process ID, in this case, process id 4
Then use
tasklist /svc /FI "PID eq [PID Number]"
to find the process. Use Task Manager to close the program in question and then see if netstat
still reports it as being open.
References
- https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Port-80/ta-p/309480
- https://stackoverflow.com/questions/1430141/port-80-is-being-used-by-system-pid-4-what-is-that
- https://superuser.com/questions/352017/pid4-using-port-80