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.

sendmail is using port 80 - can't restart apache

Discussion in 'EasyApache' started by PPNSteve, Jan 27, 2008.

  1. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    so i go to restart apache today.. and get an error:

    [root@srv2 ~]# service httpd restart
    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

    so what gives?

    apparently sendmail (or exim called as sendmail) grabs port 80 during an apache crash and/or shutdown.
    everything is pretty much a default setup as far as i can tell..

    how do we fix this unwelcome behavior?

    WHM 11.15.0 cPanel 11.17.0-R19434
    REDHAT Enterprise 4 i686 on standard - WHM X v3.1.0
     
  2. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    *bump*

    Sorry for the bump, but this issue is becoming a very annoying problem...

    Just had apache go down for about 4 hours, and with exim grabbing port 80, it was unable to be restarted.


    Come on cPanel, how about a little help here please, my datacenter techs are pretty much stumped.
     
  3. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    Run:

    # service crond stop
    # service httpd restart
     
  4. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    and I would stop cron why?
     
  5. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,382
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    How do you know that exim is running on port 80? (I assume you mean the exim MTA since that is what cPanel uses, it does not use sendmail).

    What is running on port 80?

    Code:
    lsof -i :80
     
  6. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    Because it fixes the issue. You can start it after you start apache.
     
  7. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Wow, first time I ever heard of this. Can you tell if its really exim/sendmail and not something else. What happens if you telnet to port 80 at that time, does exim respond?.

    If you check running tasks do you see any suspect "httpd", "apache" or "exim" jobs running ?

    Sounds like you really need to check if you dont have something bad running in your box, maybe you have been hacked.

    Go look in /tmp and /var/tmp, I wouldnt be suprised if you find some hackers files there.

    btw- this thread is 3 months old. How often are you seeing this problem and what did you do to fix it last time??
     
    #7 nyjimbo, Apr 26, 2008
    Last edited: Apr 26, 2008
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Yes. It is Exim. We've seen it happen in our test environments. Although off-hand I'm not certain if it's a Linux only behavior or not. It's a pretty strange set of circumstances that can cause this.

    Anyway, in EDGE we've implemented some functions to prevent this from happening.
     
  9. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Very strange. I just noticed some recent threads on this elsewhere. Whats really weird is that this might date back several years and yet still not be fixed: :confused:

    http://lists.exim.org/lurker/message/20060417.211007.174ea05d.en.html
     
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    We've implemented some additional checks when restarting various services to prevent this from happening.
     
  11. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    Is it in the edge release still? we are currently running RELEASE level.. should we push it to edge or wait a bit..

    thanks

    BTW, happened again last night.. waking up to a functionally dead server isn't much fun.
     
  12. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The changes/fixes are in the 11.23 series of development, which means at time of writing CURRENT and EDGE.
     
  13. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    OK we'll push our install up to current and see if that helps..

    once again, waking to a dead apache server isn't fun so hopefully this works out well.

    thanks again cpanelkenneth for the replies and help.. will update this thread if it continues to happen (or open a bug ticket or something)

    UPDATE:
    Well it seems that uping to current in an attempt to solve this issue makes no difference.. Just had apache crash at least 3 times and not be able to be restarted with checksrvd, WHM, or thru ssh (without first stopping exim).

    so the bug/problem still persists.
     
    #13 PPNSteve, May 12, 2008
    Last edited: May 12, 2008
  14. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Are you able to reliably reproduce this? If so, would you mind opening a ticket at https://tickets.cpanel.net/submit/

    Mark the ticket ATTN: QA Exim on port 80

    Thank you.
     
  15. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    we can get it to happen during high usage periods.. or if apache happens to crash..

    It can be usually reproduced most of the time under the above conditions (or attempting an apache restart under high loads.. )

    We''l submit a ticket and go from there..

    Support Request Id: 252190
     
  16. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Thank you. We are attempting to trace the problem to determine why the fix is not working.
     
  17. m@rtin

    m@rtin Member

    Joined:
    Apr 10, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    What changes have been made? (any way to apply the changes for an older cPanel release).
     
  18. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I would recommend updating to a newer build of cPanel. If there is any reason you are hesitant about updating to a new build (breaking custom scripts, worried about new functionality etc.) - please let me know.
     
  19. PPNSteve

    PPNSteve Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Somewhere in Ilex Forest
    cPanel Access Level:
    Root Administrator
    Twitter:
    its back... seems the script fixes aren't working again:

    Code:
    httpd failed @ Tue Jul  1 18:33:44 2008. A restart was attempted automagically.
    
    Failure Reason: Unable to connect to port 80
    attempting a restart in WHM fails

    this is unwelcome and STILL unexpected behavior and needs to be readdressed ASAP.
     
  20. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What is your full cPanel/WHM version?
     
Loading...

Share This Page