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.

This entry was posted by Pete Karl II (@steyblind) on September 03, 2010 in Apache.

Comments

Training

We offer comprehensive beginner and advanced jQuery, JavaScript and HTML5 training onsite and at The Bocoup Loft in Boston, MA.

Check out our upcoming courses:

More about training →

Categories

AJAX, Apache, Arduino, Audio, audio data api, Augmented Reality, Backbone, Bash, Bocoup, boston, Build Tool, Burst, burst-engine, Canvas, Chrome, Chromium, conflict, CouchDB, CSS, CSS3, Data, Data Visualization, EventSource, facebook, Feature Detection, Fieldrunners, Firebug, Firefox, fx4, Games, Gecko, Git, Google, Google Analytics, Grunt, hardware, heart, hole, html, HTML5, inset, Internet Explorer, Inventions, JavaScript, Johnny-Five, jQuery, jQuery Plugins, jQuery.Hive, JSARToolkit, Linux, list, Media, merge, Minefield, Mobile, moz10, mozilla, Node.js, OOP, Open Source, Open Web Apps, Opera, opposite-winding, Performance, PHP, PollenJS, Popcorn, Popcorn.js, primatives, Processing.js, RaphaëlJS, Regular Expressions, Ringmark, Ringmark Gallery, Safari, Security, shadow, social, Social Networking, specs, SpiderMonkey, sprite-viking, Standards, SVG, Sys Admin, terminal, Testing, Tools, Training, Tutorial, ubuntu, Uncategorized, Uselessware, V8, Video, Visualization, VML, W3C, Web Project Management, Web Workers, webgl, WebKit, WebRTC, wget, Workflow, wtfjs and xml.

Twitter