Most affordable 24×7 server management plan including 24×7 monitoring, security audit and much more Server Management Services
[solved]could not bind to address 0.0.0.0:80 no listening sockets available:
This error can be occurred on the restart of httpd service.
It’s because of the port 80 is not able to listen for process. The full error will be like,
root@iserversupportl1 [~]# /etc/init.d/httpd restart Warning: DocumentRoot [/home/sree/public_html/britney] does not exist (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
for i in `ps auwx | grep -i nobody | awk {'print $2'}`; do kill -9 $i;
Just run this script from the command line of the server, and the process running as nobody will be killed.
Now you need to kill all the process that listening to the port 80.
For that use the following script,
for i in `lsof -i :80 | grep http | awk {' print $2'}`; do kill -9 $i;
Now try to restart apache. If it is still not listening on port 80, then you need to remove all the semaphore. You can do this by running the following script,
for i in `ipcs -s | grep nobody | awk '{print $2}'`; do ipcrm -s $i; done
It will. be fixed now.
Need our help to fix the issue ? Submit Support Ticket Now
Leave A Comment