1

When I run "sudo /usr/sbin/apache2ctl graceful" I get the following message:

httpd not running, trying to start (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs

When I run "sudo netstat -lnp | grep :80" I get:

tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 845/aolserver4-nsd

I assume aolserver is also running? How would I get apache to run?

2

You have another webserver running already. You have to stop or kill it before you can start Apache (or change one of them to a non-standard port, ie something other than port 80).

3
  • That would be aolserver4-nsd – hookenz Nov 10 '10 at 1:44
  • I'm not too familiar with setting up servers at the moment but how do I stop aolserver? – user57194 Nov 10 '10 at 1:57
  • If you're on Linux, killall aolserver4-nsd should stop it, but it sounds like it's starting automatically, so you'll need to disable it in the startup configuration. I don't know Linux well enough to tell you how to do that (Someone else help!) – Chris S Nov 10 '10 at 2:00
2

You have a running process named aolserver4-nsd already bound to 127.0.0.1:80, so apache's attempt to bind to 0.0.0.0:80 was denied. Although at first glance it might appear that there should be no conflict between the two, address 0.0.0.0 is the special "any address", and binding to it actually binds to ALL available network interfaces (including the loopback 127.0.0.1).

There are a number of ways to proceed:

  1. You can stop aolserver4-nsd, so that it releases its bind on 127.0.0.1:80. Then you can start apache, and it should successfully bind to 0.0.0.0:80. If you proceed this way, you can only have one of the two processes running at the same time.

  2. You can configure either aolserver4-nsd or apache to bind to a non-standard port (i.e. one other than port 80). (The Listen directive is what you'll need to configure for apache.) This will allow you to run both processes at the same time.

  3. You can configure apache to bind to a specific address instead of to the special "any address" 0.0.0.0. Of course, you will need to configure apache to Listen to an address that exists on one of your server's network interfaces (but not 127.0.0.1). This will also allow both aolserver4-nsd and apache to run simultaneously.

-1

You can check for running apache processes with

ps -efwww | grep apache

Or depending on the distro, grep for httpd

1
  • From the question: "tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 845/aolserver4-nsd" <- Note the aolserver4-nsd program is bound to port 80. – Chris S Nov 10 '10 at 13:36
-1

Try 'netstat -nap' to see what's got the port open

1
  • From the question: "tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN 845/aolserver4-nsd" – Chris S Nov 10 '10 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy