Currently 1 of the server under my monitoring is down. I check it and found that the httpd service cannot be started.

When i try to restart the service, it give me the following error:

(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

I ran this command in terminal:

[[email protected] home]#lsof -i :80

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
shbd 8050 nobody 6u IPv4 2194754 TCP *:http (LISTEN)
h1t3m 9268 nobody 6u IPv4 2194754 TCP *:http (LISTEN)
sh 14588 nobody 6u IPv4 2194754 TCP *:http (LISTEN)
r0 14589 nobody 6u IPv4 2194754 TCP *:http (LISTEN

[[email protected] home]#kill -9 8050 9268 14588 14589

[[email protected] home]#lsof -i :80

[[email protected] home]#

[[email protected] home]#service httpd start

Webserver running fine after that.

There are two type of signal for kill. You can set the signal to 15(Graceful Kill) or 9(Forcible Kill). Use 15, it will wait until the process finished and kill the process. Choose 9 to force to kill the process even it still not finished.

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *