Address already in use: make_sock: could not bind to address 127.0.0.1:9010

Hello, I'm running Mac OS X 10.6.2 Server on a Mac mini server.

I am getting this repeating error in /var/log/system.log:

Jan 14 20:55:25 internet org.apache.httpd[81960]: (48)Address already in use: make_sock: could not bind to address 127.0.0.1:9010
Jan 14 20:55:25 internet org.apache.httpd[81960]: no listening sockets available, shutting down
Jan 14 20:55:25 internet org.apache.httpd[81960]: Unable to open logs
Jan 14 20:55:25 internet com.apple.launchd[1] (org.apache.httpd[81960]): Exited with exit code: 1
Jan 14 20:55:25 internet com.apple.launchd[1] (org.apache.httpd): Throttling respawn: Will start in 10 seconds

This error just repeats forever. Restarting the service or restarting the computer does not solve the problem.

Server version: Apache/2.2.13 (Unix)

This is probably an easy fix. Does anyone know what that fix is?

Thank you!

Mac mini server, Mac OS X (10.6.2)

Posted on Jan 14, 2010 6:00 PM

Reply
9 replies

Jan 14, 2010 8:31 PM in response to TigerKR

It means that some other process is already listening on port 9010 and is thereby preventing Apache from loading.

9010 is configured as an internal status monitoring port where you can query Apache for its status.

The fact Apache can't bind to it means some other process is already using that port - it could be another copy of Apache, or it could be some other process altogether.

You can find out what process is using it via:

sudo lsof -i :9010


This will list any process that's using port 9010. Once you have this you can determine how to fix it - e.g. either by disabling/reconfiguring the other process or by reconfiguring apache to not use 9010.

(as a guess I'm going to speculate that you have another copy of Apache running on this machine, but I'll wait until the results of your lsof command before I saw much more).

Jan 14, 2010 9:22 PM in response to Camelot

Thank you for your reply.

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
servermgr 73 root 17u IPv4 0x0a38e6b0 0t0 TCP www.mydomaion.com:50106-> www.mydomaion.com:9010 (CLOSE_WAIT)
httpd 146 root 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 148 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 154 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 172 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 173 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 187 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 188 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 189 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 190 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 199 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 200 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 201 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 202 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 203 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 204 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 205 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 206 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 207 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 208 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 209 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 210 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 211 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 212 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 213 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 214 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 215 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 216 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 217 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 218 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 219 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 220 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 221 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)
httpd 222 _www 3u IPv4 0x094e7740 0t0 TCP www.mydomaion.com:9010 (LISTEN)

Is that normal?

Jan 14, 2010 10:25 PM in response to TigerKR

OK, just as I expected - you already have a copy of Apache running.

So either you're trying to launch Apache twice, or there's a second copy of Apache running that you're not aware of.

Is it normal? not at all. The real question is how you got into this state. How did you try to launch Apache? Did you use Server Preferences/Server Admin? or did you try to start it manually?

Jan 15, 2010 12:02 AM in response to Camelot

This is right after a restart. I did not start apache on my own. I do have Mac OS X Server set to serve webpages.

This background might be helpful. This setup was migrated from a different computer running Mac OS X Server 10.4.11. For some reason none of my web server settings made it across, so I tried to manually bring them across (using apple's directions). When that didn't work, I downloaded the latest stable apache source, and then compiled and installed it. But I guess that didn't work either because the running version of apache is 2.2.13 (not 2.2.14). Finally after a lot of frustration, I got my settings into Server Admin and was able to start serving up web pages.

Which leads me to today's predicament.

However, as far as I can tell, the only version of httpd that I have installed is /usr/sbin/httpd

/usr/sbin/httpd -V
Server version: Apache/2.2.13 (Unix)
Server built: Oct 16 2009 02:12:22
Server's Module Magic Number: 20051115:23
Server loaded: APR 1.3.8, APR-Util 1.3.9
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE MPMDIR="server/mpm/prefork"
-D APR HASSENDFILE
-D APR HASMMAP
-D APR HAVEIPV6 (IPv4-mapped addresses enabled)
-D APR USE_FLOCKSERIALIZE
-D APR USE_PTHREADSERIALIZE
-D SINGLE LISTEN_UNSERIALIZEDACCEPT
-D APR HAS_OTHERCHILD
-D AP HAVE_RELIABLE_PIPEDLOGS
-D DYNAMIC MODULELIMIT=128
-D HTTPD_ROOT="/usr"
-D SUEXEC_BIN="/usr/bin/suexec"
-D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
-D DEFAULT SCOREBOARD="logs/apache_runtimestatus"
-D DEFAULT_LOCKFILE="/private/var/run/accept.lock"
-D DEFAULT ERRORLOG="logs/errorlog"
-D AP TYPES_CONFIGFILE="/private/etc/apache2/mime.types"
-D SERVER CONFIGFILE="/private/etc/apache2/httpd.conf"

Jan 15, 2010 10:20 AM in response to TigerKR

I downloaded the latest stable apache source, and then compiled and installed it.


Well, that could be a problem. Where did you install it? Typically, IIRC, Apache will default to /usr/local which could mean you have two copies of Apache installed.

This setup was migrated from a different computer running Mac OS X Server 10.4.11.


Did you upgrade an existing 10.4 server? or just migrate the data/config?

The default Apache version in 10.4 was 1.3.something. I've never tried upgrading from 10.4 -> 10.6 so I don't know what the migration process does. I'd hope that it removes the 1.3 version and migrates the sites' config files but it's possible that it leaves 1.3 in place, too :: shudder ::

At this point it's going to be hard to work back. There clearly are at least two versions of Apache installed, both of which are trying to run and causing all kinds of problems. Without knowing your skill level under the hood it's hard to know how to advise you to proceed.

Jan 15, 2010 1:09 PM in response to Camelot

You're correct. There is another version in /usr/local. I guess the locate database hasn't been updated since then. I deleted /usr/local/apache2. And I moved the /etc/httpd-1.3.saved-Pre-SnowLeopard-unmodified folder to the trash.

But the problem persists. I believe that there are probably be two config files telling apache to startup. Where would Apache have installed a startup file?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Address already in use: make_sock: could not bind to address 127.0.0.1:9010

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.