Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
1  
I have given an answer earlier at this link: serverfault.com/questions/415487/service-httpd-restart-error/… You might check if apache has permissions to the log dir/file you specified for it also issue lsof -i :80 and see who's using port 80 –  val0x00ff Jan 21 '13 at 11:06
    
Thank you for your hint. The next time the server hangs i will check lsof. –  Kai Jan 21 '13 at 11:12
    
@Kai Did val0x00ff's answer help you out? Does your httpd.conf contain multiple "Listen" lines (httpd.apache.org/docs/2.4/bind.html)? –  Signal15 Dec 4 at 15:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.