Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having compiled, installed and configured Apache 2.2.15 on Mac OS X Server 10.6, all went fine. The server is running fine when started manually, no configuration problems.

Then i added a launchd system wide daemon (in /Library/LaunchDaemons/), loaded it and rebooted. Again this seems to work fine.

But Apache doesn't start at boot due to a problem with mod_unique_id, i guess. Here is the apache error log entry:

[Tue Jun 29 09:01:29 2010] [alert] (EAI 8)nodename nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "" Configuration Failed

It seems to me that launchd is firing the job too early in the boot process, at a time when reverse DNS lookup isn't done or properly propagated. If i start Apache manually via ssh, it starts without errors. (The server has a static IP with a fully qualified domain name set.)

Here is some lines out of my system.log:

Jun 29 09:01:29 org.apache.httpd[88]: httpd: apr_sockaddr_info_get() failed for
Jun 29 09:01:29 org.apache.httpd[88]: httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
Jun 29 09:01:29 emond[78]: SetUpLogs: uid = 0 gid = 0
Jun 29 09:01:29 emond[78]: SetUpLogs: opening /Library/Logs/EventMonitor/EventMonitor.error.log
Jun 29 09:01:29 sandboxd[100]: kadmind(54) deny network-bind
Jun 29 09:01:29 sandboxd[100]: kadmind(54) deny network-bind
Jun 29 09:01:30 loginwindow: Login Window Application Started
Jun 29 09:01:30 (org.apache.httpd): Exited with exit code: 1
Jun 29 09:01:30 configd: network configuration changed.

The logs here are pretty clear, Apache is launched and fail to start right before the network is configured with a valid IP and DNS name. But this isn't consistent, in an other boot, the network configuration is done first, but the problem persists.

I tried to set the ServerName variable in httpd.conf to either the server's IP or FQDN, didn't helped.

I am a little lost, that's why i came here. Many searches on the net didn't helped me either.

What am I missing?

share|improve this question
up vote 1 down vote accepted

You can tell launchd to respawn the daemon if it crashes by adding something like this:


to the launchd .plist file. Note: make sure you're running httpd with the -D FOREGROUND option so launchd can track its state properly, i.e. you should be running it like this:


Also, you might want to change the item's label (and filename) to something other than org.apache.httpd; there's already a daemon by that label in /System/Library/LaunchDaemons, and I'm not sure if there's a possibility of a label conflict.

share|improve this answer

Your Answer


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.