service unavailability detection

dan

Verified User
Joined
Jan 2, 2007
Messages
99
Location
North Wales, UK
here's an idea
I got this message for several hours last night, as httpd went down while I was asleep.
"The service 'httpd' on server aqua.bluespider.org is currently down".
Obviously, this left httpd down all night for all my customers.
Can this monitor:
a) check more than once an hour?
b) restart the necessary service(s) when it detects they're down - bit like Webmin's monitor does?
 
By default DirectAdmin checks every minute, and attempts to restart httpd. If it was down for hours there was something wrong and a standard restart command wasn't working.

You might want to check your /usr/local/directadmin/data/admin/services.status; it needs to have the line httpd=ON in it.

Jeff
 
Code:
aqua# cat services.status
directadmin=ON
exim=ON
httpd=ON
mysqld=ON
named=ON
proftpd=ON
sshd=ON
vm-pop3d=ON

what could be wrong? httpd was down for 8 hours or so today.
 
Lots of things could be wrong. Problems with HTTP have been discussed on these forums, and on apache forums. First step is to see your logs.

Jeff
 
here's the DA task queue (error) log:

2007:08:31-08:04:10: service httpd didn't start, re-starting it
2007:08:31-08:05:00: service httpd wasn't running, starting it
2007:08:31-08:05:10: service httpd didn't start, re-starting it
2007:08:31-08:06:00: service httpd wasn't running, starting it
2007:08:31-08:06:10: service httpd didn't start, re-starting it
etc....
DA's system log:

2007:08:31-00:32:02: httpd restarted
2007:08:31-00:33:00: httpd started
2007:08:31-00:33:10: httpd restarted
2007:08:31-00:34:00: httpd started
2007:08:31-00:34:10: httpd restarted
2007:08:31-00:35:01: httpd started
2007:08:31-00:35:11: httpd restarted
etc...

and here's the httpd error log for the time it rehashes/restarts httpd during the night when it tallies up:

[Fri Aug 31 00:00:15 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e-p1 PHP/4.4.2 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 31 00:00:15 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 31 00:00:15 2007] [notice] Accept mutex: flock (Default: flock)
[Fri Aug 31 00:30:01 2007] [notice] SIGHUP received. Attempting to restart
[Fri Aug 31 00:30:02 2007] [notice] Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7e-p1 PHP/4.4.2 FrontPage/5.0.2.2510 configured -- resuming normal operations
[Fri Aug 31 00:30:02 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 31 00:30:02 2007] [notice] Accept mutex: flock (Default: flock)
[Fri Aug 31 00:32:00 2007] [notice] caught SIGTERM, shutting down

i login via ssh, "apachectl start", and it starts perfectly, so i can't see why DA's having such a hard time about it.

httpd died again last night (no reboots or anything), once again leaving my customers without web access all night. this is starting to get irritating, and potentially lose me some business.
 
Last edited:
Does your version of apache match the version DA thinks is installed?

I believe DirectAdmin tries the system restart script, which may or may not be apachectl. Iin the RedHat based distributions I'm familiar with it's /etc/rc.d/init.d/httpd. So if you manually run that command, using the same options DirectAdmin uses, do you get any error or failure to restart?

Have you tried contacting DirectAdmin support?

Jeff
 
well, the version that DA says apache is in the system information page is the same that the log i just posted said.

i've just sent DA an email now hoping they can help. i've no idea what commands DA issues to shutdown/restart apache. if it was apachectl, then i can see no reason why it would fail. if it starts httpd manually...i really don't know!!
 
Did you make a change to httpd.conf? What error do you get when restartin httpd, suppose that would be the first question you'd have to ask yourself.
 
well, the version that DA says apache is in the system information page is the same that the log i just posted said.

i've just sent DA an email now hoping they can help. i've no idea what commands DA issues to shutdown/restart apache. if it was apachectl, then i can see no reason why it would fail. if it starts httpd manually...i really don't know!!

I'm amazed that your running your own server and you dont know how to restart Apache? How can you run a successful business like that? How can your users trust your service from an operation standpoint?

But your not the only one. DA forums are full of people who haven't got a clue on server management yet they are running web hosting services. I dont get the logic.
 
i know how to restart apache. i'm a sysadmin by day, and i know freebsd basically inside out. my issue is that DA does it's maintenance overnight, and fails to restart it itself. i have to login manually to restart it, but it spends several hours down because i'm generally asleep when it happens.
if you also read up, i say that if i login via ssh and do apachectl start, it starts ok, so why can't DA do it?
...
 
Did you make a change to httpd.conf? What error do you get when restartin httpd, suppose that would be the first question you'd have to ask yourself.

the only change the httpd.conf has been made to is:

Code:
# Alias for RoundCube webmail
Alias /roundcube /var/www/html/roundcube/

why would that stop it automatically restarting?
 
i say that if i login via ssh and do apachectl start, it starts ok, so why can't DA do it?
I don't use FreeBSD and I don't know how DirectAdmin is restarting Apache on FreeBSD.

It's failry obvious, though, that it's not restarting it the way you are.

So the key is to find out how DirectAdmin is restarting it, and try that from the command line, and see if you're getting errors.

I presume you're checking the error log, so I won't mention that here ;) .

Jeff
 
indeed. i've had another ganders through all the logs relating to DA & apache, and there doesn't seem to be anything glaringly obvious in the way of errors. the httpd error log says it received a sighup, which i presume is DA doing it's thing, then got shutdown a bit later. not sure what that's about. unless that's another one of DA's things. then in DA's error logs it's just messages repeatedly saying it tried to start httpd and failed, restarting, and over again.
shall wait and see what DA have to say if and when they get/reply to my email. i just don't want to be staying up 'til after midnight every night to restart apache manually! some nights i'm tired! lol
 
I'm amazed that your running your own server and you dont know how to restart Apache? How can you run a successful business like that? How can your users trust your service from an operation standpoint?

But your not the only one. DA forums are full of people who haven't got a clue on server management yet they are running web hosting services. I dont get the logic.

You make it sound as if this is limited to DA users.
 
Back
Top