Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A shell script to check on Apache' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell script to check on Apache
Authored by: TvE on Jan 03, '05 10:46:26AM

And why is Mac OS X's WatchDog not automagically restarting Apache in such a case - I mean that's what it suppose to do right…?



[ Reply to This | # ]
A shell script to check on Apache
Authored by: bluehz on Jan 03, '05 12:17:20PM

I am not sure that the non-server version of Mac OS X includes any sort of "watchdog" (aka daemon) tools for initiating Apache. I may be completely mistaken on this though.

I know on my Linux box that has mission critical Apache running - I use daemontools as a system wide daemon controller for processes (such as Apache) that do not have their own daemon mode. Daemontools will compile on Mac OS X just fine, although I don't have much experience using it in Mac OS X environment.

http://cr.yp.to/daemontools.html

[ Reply to This | # ]

WatchDog
Authored by: Tomnibus on Jan 03, '05 02:14:52PM

hmmm, I'm fairly new to Mac OS X Server. I've been working on linux boxes for years now. I didn't know that there was a monitoring system on the server. I will/could probably use that then.

I do actually need to institute monitoring on my systems since they're taking over for other servers that are monitored by a third party (who won't be helping us at the new location.)



[ Reply to This | # ]
A shell script to check on Apache
Authored by: Tomnibus on Jan 08, '05 02:39:12AM

I don't know if you will get this comment but I have looked hi and low across the internet on how to get watchdog to check apache.

I put it in my script and I get this:
[code]2005-01-08 02:26:56 EST Started child "/usr/sbin/apachectl" as pid 18941.
2005-01-08 02:26:56 EST Reaped child process 18941 ("/usr/sbin/apachectl"); quit with exit status 0.
2005-01-08 02:26:56 EST Process "/usr/sbin/apachectl" respawning too rapidly![/code]

Why? Well, I looked online for that error and someone who put it into their inittab had the same problem and a response came:
<blockquote>
Apache is not supposed to run from init. It runs as a daemon, ie.
it forks a child and the parent exits; init thinks it keeps dying
so it keeps trying to restart it.
</blockquote>

So, essentially watchdog cannot watch apache.



[ Reply to This | # ]