[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Apache will not start/stop with Monit, unless..
From: |
Brian Layman |
Subject: |
Apache will not start/stop with Monit, unless.. |
Date: |
Sun, 17 Jul 2011 12:23:21 -0400 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 |
So I am trying to get monit to work correctly for a client.
When I have the start stop actions set up like
start = "/etc/init.d/httpd start"
stop = "/etc/init.d/httpd stop"
or
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
It cannot stop or start the httpd process.
I get results like:
Monitoring disabled -- service apache
'apache' stop: /etc/init.d/httpd
monit daemon at 2425 awakened
'apache' failed to stop
-------------------------------------------------------------------------------
monit [0x805442e]
monit(LogError+0x22) [0x8054842]
monit(Event_post+0x382) [0x8051f22]
monit [0x804fb8f]
monit(control_service+0x10c) [0x804ff6c]
monit [0x8066098]
monit(validate+0x78) [0x8066188]
monit [0x80567aa]
monit(main+0x55f) [0x805710f]
/lib/libc.so.6(__libc_start_main+0xdc) [0x3ace9c]
monit [0x804ee51]
-------------------------------------------------------------------------------
Execution failed notification is sent to ...
To debug I added an intermediary script to do some logging and of course
as all debugging actions do, its mere presence solved the problem.
Here is my current start stop:
start = "/root/startapache"
stop = "/root/stopapache"
Here are the contents:
address@hidden cat /root/startapache
#!/bin/sh
echo "/root/startapache called" >>/root/httpds.log
/etc/init.d/httpd start
address@hidden cat /root/stopapache
#!/bin/sh
echo "/root/stopapache called" >>/root/httpds.log
/etc/init.d/httpd stop
address@hidden
What does this indicate? I'm stopped right here in the configuration
and roll out because if it doesn't work for apache, how likely is it to
work for any other service like named which is setup the same way.
One thing that bothered me when I ran monit -Iv is that it gives the result:
'apache' stop: /etc/init.d/httpd
Shouldn't that be:
'apache' stop: /etc/init.d/httpd stop
HELP! thanks!
--
Brian Layman
- Apache will not start/stop with Monit, unless..,
Brian Layman <=