May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Apache: No listening sockets available, shutting down

One of the advantages of maintaing a popular project like XAMPP is the immense amount of community feedback you get. In other words: your inbox is a daily challenge. PHP 5.3 incompatibilities are hot topics these days. Here’s an Apache related one which hits my inbox on a very regular basis.

Variant 1

Apache complains about:

(98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs

The “Unable to open logs” in this error message is very confusing and often points people in the wrong direction. There is nothing wrong with directory or file permissions, in this case there is simply another process already occupying port 80 and that prevents Apache from binding to this port. Find out which process is using this port and stop it. Alternatively let Apache use another port.

Variant 2

Actually if it’s a permission issue you will see:

(13)Permission denied: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs

Here Apache tried to bind port 80, but got rejected by the system because the Apache wasn’t started as root. On Unix systems only processes by the user root are allowed to bind ports below 1024. To fix this: Let Apache bind to a port above 1024 or start Apache as root.

Variant 3

If you just get this error, without “no listening sockets available…”:

(98)Address already in use: make_sock: could not bind to address [::]:80

Looks very similar to the first variant, but in this case you probably just have multiple “Listen 80” directives in you Apache’s configuration. Become aware of all Include directives in your httpd.conf and remove all Listen duplicates.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>