Thursday, 12 December 2013

Address already in use: make_sock: could not bind to address

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
Check the Apache process
root@ [~]# ps aux | grep httpd
root 6846 0.0 0.0 4956 700 pts/0 S+ 04:22 0:00 grep httpd
root 29439 0.0 0.7 145736 125784 ? S 03:06 0:00 /usr/local/apache/bin/httpd -k start -DSSL
Check whether port 80 is listening on the server.
root@ [~]# netstat -lnp | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 29439/httpd
The below command will display which service is running on port 80. Please use lsof command before and after the process start. You can see the changes.
lsof -i tcp:80
lsof -i | grep httpd

Kill the process and start the service
root@ [~]# kill -9 29439
root@ [~]# ps aux | grep httpd
root 7258 0.0 0.0 4956 704 pts/0 S+ 04:22 0:00 grep httpd
root@ [~]# /etc/init.d/httpd start
root@ [~]# ps aux | grep httpd
root 7312 17.2 0.7 151624 127688 ? Ss 04:23 0:00 /usr/local/apache/bin/httpd -k start -DSSL
root 7335 0.0 0.7 143376 122460 ? S 04:23 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 7336 6.0 0.7 153152 127272 ? S 04:23 0:00 /usr/local/apache/bin/httpd -k start -DSSL
nobody 7337 2.0 0.7 152180 126460 ? S 04:23 0:00 /usr/local/apache/bin/httpd -k start -DSSL
root 7361 0.0 0.0 4960 700 pts/0 S+ 04:23 0:00 grep httpd

No comments:

Post a Comment