LinuxFreaky

Well-Known Member
Sep 22, 2001
87
0
306
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.
 

parag

Well-Known Member
Aug 16, 2001
115
0
316
[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
 

Djelibeybi

Well-Known Member
Mar 19, 2002
55
0
306
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.
 

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
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?
 

itf

Well-Known Member
May 9, 2002
620
0
316
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
 

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
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.
 

itf

Well-Known Member
May 9, 2002
620
0
316
/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
 

indiboi

Well-Known Member
Aug 14, 2001
89
0
306
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.
 

itf

Well-Known Member
May 9, 2002
620
0
316
[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)
 

indiboi

Well-Known Member
Aug 14, 2001
89
0
306
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.
 

indiboi

Well-Known Member
Aug 14, 2001
89
0
306
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.
 

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
Still having the problem here. Im on build 20, been there since it was released.
 
Jan 2, 2002
11
0
301
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
 

haze

Well-Known Member
Dec 21, 2001
1,540
3
318
the problem seems to have resolved itself with us.
 

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
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
 

ecoutez

Well-Known Member
May 23, 2002
152
0
316
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