Tuesday 5 May 2015

Apache restart error: Unable to open logs!

I got the following error while restarting httpd

# service httpd restart
Starting httpd: (98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs!

As the error states, apache is not able to bind to its default ports because it has already been used by some processes.

Check which all processes are listening to port 80 or 443. You can use the following commands.

1. netstat -lnp | grep ''

2. lsof | grep *:www

3. lsof -i:443

4. fuser -v 443/tcp

5. netstat -tulpen | grep :443

You can kill those processes and then restart httpd.

This usually solves the problem.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.