I just restarted Apache and now the server is down

Posted by James on Server Fault See other posts from Server Fault or by James
Published on 2011-01-05T19:17:36Z Indexed on 2011/01/06 0:56 UTC
Read the original article Hit count: 441

Filed under:

I am pretty terrified right now. I'm scared I'm going to get a call in a couple minutes from a hundred people saying the website doesn't work.

I was at the terminal changing some configuration files when I went to restart the server to update the .conf files with this command:

/etc/init.d/apache2 graceful

After I ran that, none of the websites work and I have no idea what to do.

There are about 100 errors I am getting according to the log files. They all begin with "PHP Notice" and most relate to "use of undefined constant" Also, I just spoke with a coworker, describing what I did, and he noticed that there are two installations of apache on the server and that I restarted the one that we don't use.

This is what the error log says (assuming it's the correct error log):

[Wed Jan 05 11:52:06 2011] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/u/apps/staging/antetr/current/public/] does not exist
[Wed Jan 05 11:52:08 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
(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
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs
(2)No such file or directory: apache2: could not open error log file /u/apps/production/madfilmdash/current/log/apache-error.log.
Unable to open logs

FINAL UPDATE:

Ok, I fixed it. The problem was (as you experts facepalming probably know) that it couldn't access an error log in the directory I was working in. I created an empty error log file and tried the restart command again and now all the sites are back up... Though my original problem is still there..

Thanks to all those who offered advice, it really helped and let me breathe for a moment.

© Server Fault or respective owner

Related posts about apache2