Announcement

Collapse
No announcement yet.

make_sock could not bind to address

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • make_sock could not bind to address

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

    Problem:-

    While restarting the http service if you get the following error:

    ================================================== ===============
    [[email protected] ~]# /etc/init.d/httpd restart
    Stopping httpd: [FAILED]
    Starting httpd: (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
    ================================================== ===============

    Solution:-

    Find the total no of open process for the port 80 with command "lsof -i :80"

    [[email protected] ~]# lsof -i :80
    COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
    perl 17958 apache 4u IPv6 9020162 TCP *:http (LISTEN)
    After that, kill all open process (17958) listed above and restart the http service again.

    [[email protected] ~]# kill -9 17958
    [[email protected] ~]# lsof -i :80
    [[email protected] ~]# apachectl stop
    [[email protected] ~]# apachectl start
    [[email protected] ~]# /etc/init.d/httpd restart
    Stopping httpd: [ OK ]
    Starting httpd: [ OK ]
    [[email protected] ~]#
    Done!!!
Working...
X