logo

Address already in use: make_sock: could not bind to address – Apache – HTTPD Error

logo

I was getting the following error on one my servers, after updating apache2 and php5

 Starting web server (apache2)...(98)Address already in use: make_sock: could not bind to address [::]:80
(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
failed!

This is what I did to fix the problem

netstat -lnp | grep '80'#output
tcp6       0      0 :::80                   :::*                    LISTEN     18712/apache2

In my case the output showed that apache2 was already using the port, although no sites was working and it was not even possible to stop the apache2 daemon. I ran the following to learn more

ps 18712
PID TTY      STAT   TIME COMMAND
18712 ?        Ss     0:00 /usr/sbin/apache2 -k start

I killed the apache2 process, which was blocking everything

kill 19712

and restarted apache

/etc/init.d/apache start

and everything was working fine again. Hopefully this is useful for someone..

No related posts.

16 Responses to “Address already in use: make_sock: could not bind to address – Apache – HTTPD Error”

  1. Michele says:

    Very useful, thank you very much!

  2. Bas Kuis says:

    Wow!

    I was sweating bullets with my server down after a misconfiguration!

    This helped me get back online! … and I can go to bed now… :-)

    Thanks!

  3. Chris Wilson says:

    FINALLY, an answer to my problems. Thanks!

  4. mario says:

    YESS,

    your help save my life :)

    than you!

  5. Miky says:

    Thank you so very much. Saved my week end :)

  6. gilles says:

    wouah thanks a lot, by taping the message in google i got 1 page of bad tips and fucking spams until i find you

  7. Yup that’s some useful piece of information.

  8. matt says:

    thanks, very helpful

  9. danham says:

    This has fixed the problem, but how can we make sure that it never happens again. cause we have some good spec server and whenever this happens every few hours, when we check, we notice that the server memory and cpu are running fine and have not been fully consumed. nevertheless, this problem would put the port 80 to a halt and would stop users from browsing our site as a result since no network/traffic gets in to our server.

    Thanks.
    Danham

  10. ok says:

    thank you ,is the answer to the question!
    i like you

  11. lou says:

    just what the doctor ordered.

    My case was that the SSL passphrase was not entered upon boot of the server and the start-up continued anyway.

    I guess that the lack of authentication had something to do with the symptoms.

  12. BP says:

    Thanks, this worked great!

  13. Lily says:

    Thank you so much!
    It really works.

  14. nightflyer says:

    I wish I would have found this post about 8 hours ago.:) Problem is that does not fix my problem. If I reboot, then problem reappears. This all happened when I did the initial install on my test network, and then moved the server to my production network. Does this have anything to do with SSL and the subnet it was on when configured?

  15. kinousuz says:

    thanks so much for your answer
    br

  16. Jose Luis says:

    Your post really helped me, thanks.

Leave a Reply

logo
logo
Powered by Wordpress | Designed by Elegant Themes