I am working on Mac OS 10.5.6 Leopard. Today I recognized, that every 10 seconds Apache forced the following error messages to appear in my console.log:

[code lang="apache"]org.apache.httpd[10664] (13)Permission denied: make_sock: could not bind to address [::]:80
org.apache.httpd[10664] (13)Permission denied: make_sock: could not bind to address
org.apache.httpd[10664] no listening sockets available, shutting down
org.apache.httpd[10664] Unable to open logs
com.apple.launchd[79] (org.apache.httpd[10664]) Exited with exit code: 1
com.apple.launchd[79] (org.apache.httpd) Throttling respawn: Will start in 10 seconds[/code]

OS X Console.app Errors

After searching the web for this error(s), I got rid that somehow the httpd- service tries to listen on port :80, but which is already listened on by something else. The message “Unable to open logs” may refer to that Apache was not started with root-privileges, but which it needs to startup properly.

I was able to fix this error lines by doing the following steps:

  1. Go to my System Preferences.app and open “Sharing” pane. Disabling the Web-Sharing service.
    OS X Sharing Panel Services
  2. Launch Terminal.app and stopping httpd (apache) with the following command:
    [code lang="bash"]sudo apachectl -k stop[/code]
  3. Going into the Activity Monitor.app and searching for “httpd”. Select both processes and click on “Stop”.
    OS X Activity Monitor.app
  4. Shutdown and start my Mac (do a proper shutdown, not restart!)
  5. When Mac was back up running: go in to Terminal.app and execute:
    [code lang="bash"]sudo apachectl -k start[/code]

Now Apache was running again and no more errors appeared in the console.log!

However, I noticed the “Web-Sharing” service in the Sharing panel to be still inactive, even if Apache IS running. I let it this way, because the Web Server was available. And I even guess that this service was the cause of the before mentioned errors.

2 thoughts on “OS X: org.apache.httpd (13)Permission denied: make_sock: could not bind to address”

  1. I had the same problem. I think there is a simpler way to fix this, that doesn’t involve a reboot.

    I think your analysis is correct, that it is launchd trying to start Apache as an unprivileged user, maybe as a result of an accidental launchctl start org.apache.httpd as non-root.

    $ launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist
    as the same unprivileged user.

Leave a reply

Your email address will not be published. Required fields are marked *