Sep 03, 2010

Apache: Could not bind address to port (make_sock)

If you’re upgrading server software, or changing your port config, you may accidentally Funk your Wagnalls. You’ll know the error when you try to restart apache.

Apache is attempting to listen on port 8080, but cannot because it’s already in use. There are a few reasons why this might be happening.

Port configuration problem

If you have have duplicate Listen entries, Apache will yell at you. Make sure that your apache.conf & ports.conf don’t both include this directive. If it’s only being listed once (see the example ports.conf below), then make sure you didn’t accidentally duplicate your ports.conf somewhere apache would notice.

Another service could be using the port

When I ran into this error, it was because another instance of apache was already running. This next example uses netstat, grep, and kill to root out & fix the problem.

Remember to dig in and evaluate server problems instead of just rebooting. I rebooted four times before I decided that I must have screwed something up.




Comments:




Please send your questions to this address or call Bocoup at 617-379-2752.
This web page is proudly maintained by Bocoup and hosted by (mt) Media Temple.
All code on this website is Open Source. Want to work at Bocoup? Then Apply.
HTML5 Powered with Connectivity / Realtime, CSS3 / Styling, Device Access, Graphics, 3D & Effects, Multimedia, Performance & Integration, Semantics, and Offline & Storage