Super User is a question and answer site for computer enthusiasts and power users. 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

I'm having a hard time getting Apache to start running via MAMP.

I've been developing with MAMP for the past few months and all has worked fine. This morning, however, Apache has magically stopped working, despite me making no alterations to the configuration or anything.

Checking my apache_error.log I see this every time I try to start Apache via MAMP:

[Fri Sep 09 12:16:19 2011] [alert] (EAI 8)nodename nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "unknown040cced5b2fe"
Configuration Failed

Any ideas? I'm a bit stumped.

share|improve this question
Have you checked to see if port 80 or whatever port that MAMP uses for apache is available? Also check your loopback network interface. – Sandeep Bansal Sep 9 '11 at 12:05
I'm not so sure how to go about doing that (not quite as expert as most users here!) but I ran telnet 80 (as well as 8080 and 8888) and each time got the following: – Jack Sep 9 '11 at 13:52
Trying telnet: connect to address Connection refused telnet: Unable to connect to remote host – Jack Sep 9 '11 at 13:52

If MAMP provides the usual apachectl, I'd use that to test the configuration apachectl configtest.


To find out what program is already using (i.e. listening or bound to) port 80 use netstat -anp as root.

Update 2:

Note that you need to be root to bind to privileged port numbers (below 1024)

share|improve this answer
apachectl configtest returns 'Syntax OK', but just running apachectl outputs the following: – Jack Sep 9 '11 at 13:48
(13)Permission denied: make_sock: could not bind to address [::]:80 (13)Permission denied: make_sock: could not bind to address no listening sockets available, shutting down Unable to open logs – Jack Sep 9 '11 at 13:48
Then Sandeep is correct, some other application is already listening on port 80. Find out what it is (netstat -anp as root) and stop it. – RedGrittyBrick Sep 9 '11 at 15:09
My first thought would be Skype, check to see if Skype is running, it normally binds to port 80. Also your IP should be instead of – Sandeep Bansal Sep 9 '11 at 15:28
Not 100% sure, so I'm not posting this as an answer, but you probably are not starting Apache as root and you need to have root privileges (at least initially) in order to listen on port 80. I found this forum post which seems to corroborate my theory but I have not tested it out so YMMV. – d34dh0r53 Dec 17 '11 at 5:23

I just ran into this same issue and solved it by changing my Listen port arbitrarily.

I had the same error that you had, except that I was using a custom >1024 port in the first place. After changing my choice, Apache also started to write to its error log, which it refused to do apart from the similar

[Fri Sep 09 12:16:19 2011] [alert] (EAI 8)nodename nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "unknown040cced5b2fe"
Configuration Failed

message. In addition, even though netstat did not show that my port had been busy, Apache was taking quite some time to respond, commonly indicating a socket contention.

share|improve this answer

In /usr/lib there is a file libpq.5.3.dylib while Apache looks for libpq.5.dylib after I copied the file and named it libpq.5.dylib it worked.

share|improve this answer

It worked again after commenting that line in httpd.conf :

# LoadModule unique_id_module libexec/

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .