Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

So I've been working with several Virtual Hosts on OS X 10.8.2. I'm using the Apache2 installation and MySQL to run name-based virtual hosts. They have all been working perfectly fine until last night. Suddenly, all of my virtual hosts redirect to a "Cannot connect to" page.

After fiddling around and eventually checking the error logs, I've concluded that Apache is NOT actually running. For example, ps aux | grep apache only returns the grep process. However, if I try sudo /usr/sbin/apachectl start I get "org.apache.httpd: Already loaded" in response.

I've checked my httpd.conf file and it looks perfectly fine. I can't see any changes to it. I also ran the syntax check command (which escapes my brain at the exact moment), and it returned OK. The only thing I found in my error logs, the last thing, was from yesterday, Feb 21, and it says: "[Thu Feb 21 21:46:02 2013] [notice] caught SIGTERM, shutting down"

Ever since then, my Apache errors logs contain nothing (because it's not running). I've restarted, tried restarting apache; I'm at a total loss as to why it thinks it's running even though it is not.

Any ideas?

Edit

In /var/logs/system.log when I try to start and restart Apache:

Feb 23 09:27:00 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd[8766]): Exited with code: 1
Feb 23 09:27:00 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds
Feb 23 09:27:10 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd[8767]): Exited with code: 1
Feb 23 09:27:10 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds
Feb 23 09:27:16 Baileys-MacBook-Pro.local sudo[8769]:   bailey : TTY=ttys000 ; PWD=/private/var/log ; USER=root ; COMMAND=/usr/sbin/apachectl start
Feb 23 09:27:20 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd[8772]): Exited with code: 1
Feb 23 09:27:20 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds
Feb 23 09:27:20 Baileys-MacBook-Pro.local sudo[8773]:   bailey : TTY=ttys000 ; PWD=/private/var/log ; USER=root ; COMMAND=/usr/sbin/apachectl restart
Feb 23 09:27:20 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd[8777]): Exited with code: 1
Feb 23 09:27:20 Baileys-MacBook-Pro com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds
Feb 23 09:27:26 Baileys-MacBook-Pro.local sudo[8778]:   bailey : TTY=ttys000 ; PWD=/private/var/log ; USER=root ; COMMAND=/usr/bin/vi system.log

~

EDIT

I forgot to mention -- this problem persists after rebooting. Ever since the other day, it will not start but believes the httpd module is loaded.

I'm trying to find out via Google, but -- does anyone know how Apache checks if it's loaded? I know a lot of services lock files to run; is it possible Apache has a lock file somewhere that's still locked despite Apache not currently running?

EDIT

Upon request, here is the Apache error log. Because it is so gigantic, this is the result of 'sudo cat error_log | grep Feb > [a text file]' so that only the entries from the last month are listed:

[Mon Feb 04 15:15:09 2013] [notice] caught SIGTERM, shutting down
[Mon Feb 04 15:15:43 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Feb 04 15:15:43 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Feb 04 15:15:43 2013] [notice] Digest: done
[Mon Feb 04 15:15:43 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Mon Feb 04 20:26:41 2013] [notice] caught SIGTERM, shutting down
[Mon Feb 04 20:27:17 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Feb 04 20:27:17 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Feb 04 20:27:17 2013] [notice] Digest: done
[Mon Feb 04 20:27:17 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Tue Feb 05 14:06:34 2013] [notice] caught SIGTERM, shutting down
[Tue Feb 05 14:07:08 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Feb 05 14:07:08 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 05 14:07:08 2013] [notice] Digest: done
[Tue Feb 05 14:07:08 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Tue Feb 05 15:25:16 2013] [notice] caught SIGTERM, shutting down
[Tue Feb 05 15:25:50 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Feb 05 15:25:50 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 05 15:25:50 2013] [notice] Digest: done
[Tue Feb 05 15:25:50 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Tue Feb 05 16:14:22 2013] [notice] caught SIGTERM, shutting down
[Tue Feb 05 16:14:52 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Feb 05 16:14:52 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 05 16:14:52 2013] [notice] Digest: done
[Tue Feb 05 16:14:52 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Sun Feb 10 19:47:52 2013] [notice] caught SIGTERM, shutting down
[Sun Feb 10 19:47:53 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Feb 10 19:47:53 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Feb 10 19:47:53 2013] [notice] Digest: done
[Sun Feb 10 19:47:53 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Mon Feb 11 21:41:20 2013] [notice] caught SIGTERM, shutting down
[Mon Feb 11 21:41:53 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Feb 11 21:41:53 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Feb 11 21:41:53 2013] [notice] Digest: done
[Mon Feb 11 21:41:54 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Tue Feb 12 07:23:36 2013] [notice] caught SIGTERM, shutting down
[Tue Feb 12 07:24:05 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Feb 12 07:24:05 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 12 07:24:05 2013] [notice] Digest: done
[Tue Feb 12 07:24:05 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Tue Feb 12 12:49:02 2013] [notice] caught SIGTERM, shutting down
[Tue Feb 12 12:51:44 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Feb 12 12:51:44 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Feb 12 12:51:44 2013] [notice] Digest: done
[Tue Feb 12 12:51:44 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Thu Feb 14 09:14:23 2013] [notice] caught SIGTERM, shutting down
[Thu Feb 14 09:14:23 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Feb 14 09:14:23 2013] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 14 09:14:23 2013] [notice] Digest: done
[Thu Feb 14 09:14:23 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Thu Feb 14 09:14:38 2013] [notice] caught SIGTERM, shutting down
[Thu Feb 14 09:14:38 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Feb 14 09:14:38 2013] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 14 09:14:38 2013] [notice] Digest: done
[Thu Feb 14 09:14:38 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Thu Feb 14 10:01:40 2013] [notice] caught SIGTERM, shutting down
[Thu Feb 14 10:02:15 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Feb 14 10:02:15 2013] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 14 10:02:15 2013] [notice] Digest: done
[Thu Feb 14 10:02:15 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Thu Feb 14 12:42:40 2013] [notice] caught SIGTERM, shutting down
[Thu Feb 14 12:43:15 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Feb 14 12:43:15 2013] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 14 12:43:15 2013] [notice] Digest: done
[Thu Feb 14 12:43:15 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Thu Feb 14 17:07:26 2013] [notice] caught SIGTERM, shutting down
[Thu Feb 14 17:07:27 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Feb 14 17:07:27 2013] [notice] Digest: generating secret for digest authentication ...
[Thu Feb 14 17:07:27 2013] [notice] Digest: done
[Thu Feb 14 17:07:27 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Sun Feb 17 16:54:37 2013] [notice] child pid 1248 exit signal Segmentation fault (11)
[Sun Feb 17 16:54:45 2013] [notice] child pid 2909 exit signal Segmentation fault (11)
[Sun Feb 17 16:54:52 2013] [notice] child pid 1247 exit signal Segmentation fault (11)
[Sun Feb 17 16:54:52 2013] [notice] child pid 1188 exit signal Segmentation fault (11)
[Sun Feb 17 16:54:55 2013] [notice] child pid 1190 exit signal Segmentation fault (11)
[Sun Feb 17 16:55:24 2013] [notice] child pid 3747 exit signal Segmentation fault (11)
[Sun Feb 17 16:55:50 2013] [notice] child pid 1246 exit signal Segmentation fault (11)
[Sun Feb 17 16:55:54 2013] [notice] child pid 3750 exit signal Segmentation fault (11)
[Sun Feb 17 17:00:00 2013] [notice] child pid 3751 exit signal Segmentation fault (11)
[Sun Feb 17 17:00:28 2013] [notice] child pid 3754 exit signal Segmentation fault (11)
[Sun Feb 17 17:01:03 2013] [notice] child pid 3756 exit signal Segmentation fault (11)
[Sun Feb 17 17:03:58 2013] [notice] caught SIGTERM, shutting down
[Sun Feb 17 17:03:59 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Feb 17 17:03:59 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Feb 17 17:03:59 2013] [notice] Digest: done
[Sun Feb 17 17:03:59 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Sun Feb 17 17:04:10 2013] [notice] child pid 3778 exit signal Segmentation fault (11)
[Sun Feb 17 17:05:45 2013] [notice] child pid 3783 exit signal Segmentation fault (11)
[Sun Feb 17 17:05:48 2013] [notice] child pid 3782 exit signal Segmentation fault (11)
[Sun Feb 17 17:05:55 2013] [notice] child pid 3787 exit signal Segmentation fault (11)
[Sun Feb 17 17:05:58 2013] [notice] child pid 3788 exit signal Segmentation fault (11)
[Sun Feb 17 17:06:16 2013] [notice] child pid 3789 exit signal Segmentation fault (11)
[Sun Feb 17 17:06:49 2013] [notice] child pid 3791 exit signal Segmentation fault (11)
[Sun Feb 17 17:26:24 2013] [notice] child pid 3794 exit signal Segmentation fault (11)
[Sun Feb 17 17:26:28 2013] [notice] child pid 3793 exit signal Segmentation fault (11)
[Sun Feb 17 17:26:30 2013] [notice] child pid 3796 exit signal Segmentation fault (11)
[Sun Feb 17 17:26:32 2013] [notice] child pid 3806 exit signal Segmentation fault (11)
[Sun Feb 17 17:57:14 2013] [notice] caught SIGTERM, shutting down
[Sun Feb 17 17:57:52 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Feb 17 17:57:52 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Feb 17 17:57:52 2013] [notice] Digest: done
[Sun Feb 17 17:57:52 2013] [notice] Apache/2.2.22 (Unix) DAV/2 PHP/5.3.15 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/0.9.8r configured -- resuming normal operations
[Thu Feb 21 21:46:02 2013] [notice] caught SIGTERM, shutting down
share|improve this question
    
First off, Apache runs as processname httpd. –  mdpc Feb 22 '13 at 20:33
    
Ah, ok. I did not know that. I ran ps aux | grep httpd, and got only the grep process. :/ –  Mister R2 Feb 22 '13 at 20:37
    
Check /var/log/system.log -- if there's a problem serious enough that Apache never gets to the point of using its own log files, it'll usually be reported in system.log instead. –  Gordon Davisson Feb 23 '13 at 2:39
    
I've edited my post with the system.log lines that populate after I try to start and then restart Apache. When I try 'sudo /usr/sbin/apachectl start', "org.apache.httpd: Already loaded" is output to the terminal. –  Mister R2 Feb 23 '13 at 17:32
    
You need to show us the apache error log. –  Iain Feb 23 '13 at 21:29

2 Answers 2

Apache will refuse to start if it can't write log files. I've broken many an Apache install on a development machine by having directives like the following in a VirtualHost:

TransferLog  /path/to/sandbox/example.com/log/access.log
ErrorLog     /path/to/sandbox/example.com/log/error.log

and then at some point doing rm -r /path/to/sandbox/example.com because I didn't need it anymore.

share|improve this answer
up vote 0 down vote accepted

Honestly, I got fed up and tried to reinstall OS X on my machine to just start over. I ran into being unable to reinstall on the MBP? Even the Apple store guys were confused by that. I'm closing this because I think this might actually be some kind of hardware issue. They had to completely wipe and reinstall on my MacBook Pro to fix this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.