The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Bind / DNS / Nameserver Issues' started by sreeninair, Feb 17, 2014.

  1. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Guys,

    I am getting the following error in my apache log and the service is not getting started. I have to remove the following entries in http.conf to make it working. After some time it reappears and httpd fails again. Please assist me on this.


    ===============
    apache conf entries

    Listen [::]:443
    Listen [::]80

    after removing these entries apache starts working.


    ===============
    apache error log:
    [Mon Feb 17 13:01:33 2014] [notice] Graceful restart requested, doing restart
    (98)Address already in use: make_sock: could not bind to address [::]:443
    no listening sockets available, shutting down
    Unable to open logs
    ================
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Changes made to the httpd.conf file through manual edits are not preserved unless you use the distiller. However, the following entries are normal and should exist:

    Code:
    Listen 0.0.0.0:80
    Listen [::]:80
    Listen 0.0.0.0:443
    Listen [::]:443
    Do you notice duplicate entries, or do you have any other service already running on these ports?

    Thank you.
     
  3. 2kreative

    2kreative Registered

    Joined:
    Jul 22, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have the exact same problem!
    Removing
    Listen [::]:80
    Listen [::]:443 allows apache to start, otherwise I get the address already in use.

    This happened after I ran
    /scripts/buildhttpdconf

    Any ideas?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Do you have any reserved IP addresses in "WHM >> Service Configuration >> Apache Configuration >> Reserved IPs"? Also, what version of cPanel is installed on your system?

    Thank you.
     
  5. java_dude

    java_dude Active Member

    Joined:
    Apr 23, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    The same happened on a server of mine after tonight's cpanel update. Update went okay, but apache failed to start afterwards. The apache log contained "long lost child came home!". After removing

    Listen 0.0.0.0:80
    Listen [::]:80

    Apache started again and everything seems to "work". I'm going to try rebuilding apache this weekend, but obviously something went wrong after this update...
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. unity200

    unity200 Member

    Joined:
    Nov 16, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I have the same situation, latest cpanel CURRENT, and no reserved ips.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  9. unity200

    unity200 Member

    Joined:
    Nov 16, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I dont want to divulge root access to server.

    I commented out Listen [::]:80 and Listen [::]:443 and apache restarted.
     
  10. java_dude

    java_dude Active Member

    Joined:
    Apr 23, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi Michael, I'm running the latest current build - 11.42.1.11. And yes, I do have some reserved IP addresses.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It's likely that IPv6 is enabled, and it's been a while since EasyApache was ran, so a patch that addresses the issue has not been applied. Are you able to rebuild Apache via EasyApache and let us know if the issue persists?

    Thank you.
     
  12. java_dude

    java_dude Active Member

    Joined:
    Apr 23, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Ok, I tracked down the problem. I tried rebuilding apache last night and it failed to start up again. So I went through the include files and sure enough, there was a Listen [::]:80 directive in one of them - I enabled IPV6 awhile back and added that directive into the include file and completely forgot about it. After I removed that line, I was able to rebuild apache and it starts successfully.

    Odd thing is, I've definitely run EA numerous times on this system since I enabled IPV6 (to update PHP) and I've never had an issue with the process failing. Maybe because apache itself wasn't being upgraded those times?
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  14. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    Saw this on a server today. We do have a reserved IP, but IPv6 is not enabled. Can't re-run easyapache because this server is still running php 5.2 and the operators are not ready to update that to 5.3.

    I manually edited out the listen lines as described, but am hoping for another more reliable fix.
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The recommended solution to this issue is run EasyApache. Note that PHP 5.2 is available as a custom module here:

    EasyApache - Custom Modules

    Thank you.
     
  16. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    I used that once but it was missing some options. As I understand it you cannot select any of the options on the exhaustive list.

    Anything else that can be done?
     
  17. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    1. You could try using raw opts to include additional modules with PHP.

    EasyApache - Raw Opts

    However, note that it's not supported so it's not guaranteed to work without conflicts.

    2. We do have an internal case open (#99137) to explore alternatives to resolving this issue without utilizing EasyApache. There is currently no time frame available on such a solution, but I will monitor the case and update this thread with the outcome.

    Thank you.
     
  18. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    A resolution for internal case 99137 is now scheduled for a future build of cPanel. The fix will add a check to ensure the IPv6 "Listen" directives are populated only when the httpd options support it (IPv4-mapped addresses is disabled). You can monitor our change logs for this case number.

    Thank you.
     
  19. elmister

    elmister Active Member

    Joined:
    Mar 2, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Same problem here, server without IPv6 configuration, after some apache restart it doesn't come up

    httpd.conf contains the line
    Listen [::]80

    no reason for that line to be there, this server is not IPv6 enabled.

    I'm afraid that hundreds of servers without IPv6 may have this line added and apache crashed.

    Even if i remove the lines, everytime httpd.conf is rebuilt the lines are added again and the server goes down.

    We can't prevent users from adding domains or subdomains and that would cause httpd.conf to be rebuilt
     
    #19 elmister, Apr 22, 2014
    Last edited: Apr 22, 2014
  20. zye

    zye Well-Known Member

    Joined:
    Dec 6, 2002
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    Re: [Case 80445] Apache Fails - Address already in use

    same issue just happend again after /usr/local/cpanel/scripts/upcp --cron

    how can i prevent this in the future?
     
Loading...

Share This Page