make_sock: could not bind to address 0.0.0.0:80 no listening sockets available

There are three common causes for this error message.

Address is already in use

Something else is already using the port in question.

Run one of the following commands to check if a running process is holding the port needed by apache open.

On Linux/Unix run
$>  netstat -plant
$> # or
$> sudo lsof -i:80

On Windows run
$>  netstat -ano

On Mac OS X / FreeBSD run
$> netstat -Wan |grep 80
$> # or, to get the pid
$> sudo lsof -i:80

Once you see these results, you can choose to kill the program in question, or change the port that Apache uses.

If Apache (httpd, apache2, etc) is the application listening on these ports, but you can't stop it using your normal procedure, someone may have deleted the servers PidFile. The PidFile records the process ID of the parent process and is how most scripts test to see if Apache is running. You can manually stop the server by determining the PID of the parent process and sending it a SIGTERM.

http://httpd.apache.org/docs/2.2/stopping.html

Note for Windows users, Skype is known to use port 80. Also, make sure Windows IIS Web Server is not running.

Conflicting Listen directives

A configuration like this:

Listen *:80
Listen 1.2.3.4:80

will incur the same error message. This can be remedied by disambiguating the ip/port numbers.

You're not root

Unix based systems disallow non-root users to bind processes to port numbers below 1024. Get root!

apachectl/httpd stop and start in rapid succession

Use apachectl restart or wait a few seconds between stop and start

CouldNotBindToAddress (last edited 2009-09-20 22:13:35 by localhost)