Digital Sanctum

software development, technology and other square topics

Apache HTTPD: Address already in use: make_sock: could not bind to address 0.0.0.0:443

with 7 comments

apace logoDuring my latest Apache configuration change I ran into an issue where I wasn’t able to restart/start. This was the first time I encountered this and I was fairly positive the issue wasn’t due to my configuration changes. I also knew that a port can only be used by one application or daemon at a time so that clued me in that something else was already using the port. While I can’t give a definitive cause for the situation, I can give pointers on resolving the issue. Note that this pertains to Apache running on Linux so your mileage may vary.


Here’s what I encountered after I ran the ./apachectl start command:

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

To solve the issue I first tried the following to see if there were some running httpd processes that shouldn’t have been running at this point:

ps -aux |grep httpd

This revealed no processes running. Next I tried netstat and that didn’t reveal anything either. Then I decide to view all processes with ps -aux, and after close inspection found the culprit:


root      5004  0.0  0.0  4384    4 ?        S    Apr25   0:00 bash
mysql     5095  0.0  0.7 41968 7980 ?        S    Apr25   0:47 ./mysqld --user mysql
apache    7323  0.0  0.0 3014368  0 ?        TW   Apr25   0:01

There was a phantom process (line 3 above) running as the apache user but didn’t have a command associated with it. Knowing that nothing else on the server runs as the apache user, I decided to kill the varmit:

kill -9 7323

After doing this, I was able to start the apache server again.

Has anyone else run into this issue and more importantly why it happened?

Written by Shane

August 18th, 2007 at 1:42 pm

Posted in Apache, Linux

7 Responses to 'Apache HTTPD: Address already in use: make_sock: could not bind to address 0.0.0.0:443'

Subscribe to comments with RSS or TrackBack to 'Apache HTTPD: Address already in use: make_sock: could not bind to address 0.0.0.0:443'.

  1. Yes, yesterday. Entirely coincidentally as I was originally reading your 20 tomcat tips.
    I did exactly the same thing as you to kill the process.

    No idea what caused it, as I killed the process before inspecting it further.

    It was on a server with Plesk though, which was having trouble executing an upgrade.

    Pid

    22 Aug 07 at 5:53 am

  2. Thanks. This worked perfectly for me on a Suse 10 install running Apache 2. In my case the processes were running as wwwrun, but same difference. I just killed all the processes running as wwwrun, and was able to then do a rcapache2 restart with success.

    Aran

    3 Dec 07 at 11:20 am

  3. Thank you.

    Jenny

    2 Apr 08 at 11:03 pm

  4. Any pointers as to why this comes for windows

    Sandeep shukla

    26 Nov 08 at 1:04 am

  5. I had this same problem on mac osx server after restarting the box it would not start the web server – no config/permission changes which was quiet strange.

    thanks a lot this solution worked fine for me.

    gio

    14 Jan 09 at 11:05 am

  6. It worked for me too..

    Thanks for the help

    Sampurna

    26 May 09 at 6:24 am

  7. Hi,
    I got this problem today running Fedora10.
    In my case not even start after power down helped.
    No Apache user found with ps -aux.
    I could do with a hint..

    Per

    10 Jun 09 at 2:36 pm

Leave a Reply