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.

Auto Restart of Services

Discussion in 'General Discussion' started by LinuxFreaky, May 24, 2002.

  1. LinuxFreaky

    LinuxFreaky Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    Where and how does WHM monitor and automatically restart services that die? I've been having problems recently with one of my servers. Httpd would die every couple of days and WHM won't know a thing about it. In the sevices status page everything is green, and Cpanel doesn't automatically restart it either.
     
  2. dominet

    dominet Active Member

    Joined:
    Mar 23, 2002
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Im having same problem
     
  3. parag

    parag Well-Known Member

    Joined:
    Aug 16, 2001
    Messages:
    115
    Likes Received:
    0
    Trophy Points:
    16
    [quote:d9a5d2259a][i:d9a5d2259a]Originally posted by dominet[/i:d9a5d2259a]

    Im having same problem[/quote:d9a5d2259a]

    hi guys

    cpanel does restart the service automatically if it fails. the checkservd will constantly check all the services - apache, exim, bind, mysql, interchange, proftpd, syslogd, webmail etc.

    regards,
    Parag
     
  4. Djelibeybi

    Djelibeybi Well-Known Member

    Joined:
    Mar 19, 2002
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Well, chkservd seems to be ignoring my apache too. I've had to manually restart Apache several times now (its gone from the ps list) and chkservd/WHM didn't notice.

    I had mod_gzip installed, so I've removed that to see if it still keeps hanging.
     
  5. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    I have been having the exact same problem. Apache and exim fail in the middle of the night. WHM checks out fine, so its not till I get to my works station and have a load of angry customers that its restarted. Has anyone submitted a bug for this yet?
     
  6. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    resources

    1) Look in /etc/resolv.conf & /etc/hosts and make sure they are correct; Services fail continuously if those files are not setup correctly

    2) So many users or low system resources like RAM & CPU Speed
    In WHM -& Security -& Modify Apache Memory Usage Limit
     
  7. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    what exactly should be in those 2 files? Just curious, because I believe mine are set up correctly, but I would like to be sure.
     
  8. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    /etc/hosts & /etc/resolv.conf

    [quote:93b0dfd315][i:93b0dfd315]Originally posted by iminteractive[/i:93b0dfd315]

    what exactly should be in those 2 files? Just curious, because I believe mine are set up correctly, but I would like to be sure.[/quote:93b0dfd315]
    /etc/hosts :

    # Do not remove the following line, or various programs
    # That requires network functionality will fail.
    127.0.0.1 localhost.localdomain localhost
    Server-IP domain.com Short-Host-Name

    /etc/resolv.conf :

    domain domain.com
    search domain.com
    nameserver IP-of-ns1.domain.com
    nameserver IP-of-ns2.domain.com
    # you can have additional nameservers here

    Also check your DNS settings (nameservers & hostname)

    Why you don't use this to free up some resources

    In WHM -& Security -& Modify Apache Memory Usage Limit
     
  9. indiboi

    indiboi Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    It's not related to the hosts or the resolv.conf files.

    This is most likely a bug in the checkserv daemon, as it is effecting my server as well.

    I spoke with venturesonline's helpdesk, and they've stated that the checkserv daemon not paying any attention to a dead apache is becoming very common across their dedicated and virtual servers.

    I'm working on a shell script to run via cron to help restart apache until such time as the checkserv daemon is corrected.
     
  10. itf

    itf Well-Known Member

    Joined:
    May 9, 2002
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    [quote:e6ec88f9e0][i:e6ec88f9e0]Originally posted by indiboi[/i:e6ec88f9e0]

    It's not related to the hosts or the resolv.conf files.

    This is most likely a bug in the checkserv daemon, as it is effecting my server as well.

    I spoke with venturesonline's helpdesk, and they've stated that the checkserv daemon not paying any attention to a dead apache is becoming very common across their dedicated and virtual servers.

    I'm working on a shell script to run via cron to help restart apache until such time as the checkserv daemon is corrected.[/quote:e6ec88f9e0]

    If this is a bug why the others haven't any? Substantial servers are running Cpanel, also we haven't had such error with our servers (P4 1.6GHz to 2Ghz with 256MB to 2GB RAM)
    LinuxFreaky also wrote that they have the problem just with one of their servers not all of them,
    There will be 3 possible choices for root of such trouble
    1) System Resources
    2) invalid configuration
    3) Bug (you selected this but why it's not so populated and why should not to control both above choices first)
     
  11. indiboi

    indiboi Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Cpanel bugs are almost always sporadic in nature.

    There's no point in arguing over it though. Server works fine, cpanel updates, server no longer works fine.

    Configuration is fine prior to and after cpanel update

    System resources have never been an issue before.

    A problem with the checkserv daemon is the logical conclusion.

    You'd never notice this unless apache did fail, and realistically that isn't very often.
     
  12. indiboi

    indiboi Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Good news!

    I just updated to WHM/Cpanel and did a &controlled test& of checkserv, by just bluntly stopping apache. After five minutes WHManager's AIMbot messaged to state that the process for apache had failed and was restarted.

    Looks like it's working again, thankfully.
     
  13. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    Still having the problem here. Im on build 20, been there since it was released.
     
  14. ParadiseDesigns

    Joined:
    Jan 2, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I will have Nick take a look at this and see if it is a bug or what. I'm also working out resolving a clients server that is having the same problem . We have over 10 cPanel boxes and not one of them has did this to us
     
  15. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    the problem seems to have resolved itself with us.
     
  16. Djelibeybi

    Djelibeybi Well-Known Member

    Joined:
    Mar 19, 2002
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    Same here. After upgrading to CPanel/WHM 4.8.0, chkservd seems to be working again.
     
  17. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    Does checksrvd monitor Tomcat?

    I have Tomcat install for some clients and I'm wondering if checksrvd motniros Tomcat as well? Anyone know? If it doesn't, is there a way for to do so?

    Jaz
     
  18. ecoutez

    ecoutez Well-Known Member

    Joined:
    May 23, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    0
    To those that are having problems with chkservd, you should probably check the log file at /var/log/chkservd.log The file should be pretty long and probably includes times when your Apache wasn't working properly... or not being restarted automatically by chkservd.

    If Apache is found to be down, the log entry should look something like this:
    [Fri Jul 12 23:00:50 2002] Service check ....apache [-Restarting apache....
    system: killall -9 httpd
    system: /etc/rc.d/init.d/httpd stop
    system: /etc/rc.d/init.d/httpd startssl
    system: /usr/local/apache/bin/apachectl startssl
    system: /etc/rc.d/init.d/httpd start
    system: /usr/local/apache/bin/apachectl start
    ]bind [+]...interchange [+]...mysql [+]...proftpd [+]...syslogd [+]...webmail [+]...Done

    This is chkservd attempting to restart Apache (and it tries pretty hard by the looks of it). Mine has always worked fine in testing, and I've yet to find any servers with Apache randomly down. (knock wood).

    For what its worth, chkservd appears to check for Apache by making a local connection to port 80, and listening for a response from the server. It's a nice system and can also be easily tweaked to monitor other services like the POP and IMAP daemons, SSH server, etc. :)

    - Jason
     
Loading...

Share This Page