I have a very interesting symptom on one of our webservers. We have a watchdog running, that restarts the apache Process when it hangs.
But apache is not able to restart. If i try restarting it manually i get the following error message:
Starting httpd2 (prefork) (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1
ps aux | grep 80 gives me the following:
wwwrun 14187 0.0 0.1 27212 4636 ? S Jan17 0:13 [eth0]
and netstat gives me the same information:
netstat -l -n -p | grep 80
tcp 0 0 0.0.0.0:8880 0.0.0.0:* LISTEN 2004/httpsd
tcp 0 0 :::80 :::* LISTEN 14187/[eth0]
So how can it be that the interface eth0 is blocking the port? is there a way to set the port free again? Maybe with a script or cronjob? How would i approach that?
Thank you very much!
lsof -i :80and see who's using port 80 – val0x00ff Jan 21 at 11:06