[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error at start/monitorize crashed process
From: |
J1 Simón |
Subject: |
Error at start/monitorize crashed process |
Date: |
Mon, 24 Sep 2012 15:44:32 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 |
Hi,
Gentoo 64 bits
I have defined the next service in monitrc:
check process trans-simon with pidfile
/var/run/transmission-simon.pid
start program = "/etc/init.d/trans-simon start"
stop program = "/etc/init.d/trans-simon stop"
if 2 restarts within 4 cycles then exec
"/etc/init.d/trans-simon zap"
if 7 restarts within 10 cycles then timeout
This the output of monit.log with this service:
[CEST Sep 24 15:09:45] error : 'trans-simon' process is not running
[CEST Sep 24 15:09:45] info : 'trans-simon' trying to restart
[CEST Sep 24 15:09:45] info : 'trans-simon' start:
/etc/init.d/trans-simon
[CEST Sep 24 15:10:15] error : 'trans-simon' failed to start
[CEST Sep 24 15:11:16] error : 'trans-simon' process is not running
[CEST Sep 24 15:11:16] info : 'trans-simon' trying to restart
[CEST Sep 24 15:11:16] info : 'trans-simon' start:
/etc/init.d/trans-simon
[CEST Sep 24 15:11:46] error : 'trans-simon' failed to start
[CEST Sep 24 15:12:46] error : 'trans-simon' service restarted 2
times within 2 cycles(s) - exec
[CEST Sep 24 15:12:46] info : 'trans-simon' exec:
/etc/init.d/trans-simon
[CEST Sep 24 15:12:46] error : 'trans-simon' process is not running
[CEST Sep 24 15:12:46] info : 'trans-simon' trying to restart
[CEST Sep 24 15:12:46] info : 'trans-simon' start:
/etc/init.d/trans-simon
[CEST Sep 24 15:12:47] info : 'trans-simon' started
[CEST Sep 24 15:13:47] error : 'trans-simon' service restarted 3
times within 3 cycles(s) - exec
[CEST Sep 24 15:13:47] info : 'trans-simon' exec:
/etc/init.d/trans-simon
[CEST Sep 24 15:13:47] info : 'trans-simon' process is running
with pid 55606
[CEST Sep 24 15:14:48] error : 'trans-simon' service restarted 3
times within 4 cycles(s) - exec
[CEST Sep 24 15:14:48] info : 'trans-simon' exec:
/etc/init.d/trans-simon
Output of daemon.log:
Sep 24 15:09:45 ks212190 /etc/init.d/trans-simon[55382]: WARNING:
trans-simon has already been started
Sep 24 15:11:16 ks212190 /etc/init.d/trans-simon[55496]: WARNING:
trans-simon has already been started
In Gentoo it can't start a service that theoretically is started
(http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4) .
The correct, I think, would be execute a restart or a stop and then
start. Not a start directly.
For this erroneous behaviour I have defined: if 2 restarts within 4
cycles then exec "/etc/init.d/trans-simon zap"
But the worst is that the service is started:
simon 55606 1 0 15:12 ? 00:00:08
/usr/local/bin/transmission-daemon ....
# cat /var/run/transmission-simon.pid
55606
but Monit says no:
# monit summary
The Monit daemon 5.5 uptime: 2d 19h 45m
Process 'trans-simon' Timeout
And the alert emails are confusing too (in chronological order):
Does not exist Service trans-simon
Date: Mon, 24 Sep 2012 15:09:45
Action: restart
Description: process is not running
-------------------------
Execution failed Service trans-simon
Date: Mon, 24 Sep 2012 15:10:15
Action: alert
Description: failed to start
-------------------------
Timeout Service trans-simon
Date: Mon, 24 Sep 2012 15:12:46
Action: exec
Description: service restarted 2 times within 2 cycles(s) - exec
-------------------------
Execution succeeded Service trans-simon
Date: Mon, 24 Sep 2012 15:12:47
Action: alert
Description: started
-------------------------
Exists Service trans-simon
Date: Mon, 24 Sep 2012 15:13:47
Action: alert
Description: process is running with pid 55606
It executes a timeout before "7 restarts within 10 cycles" and then it
says that the process is active but monit summary still show it as
timeout. ¿?
What's the problem?
Regards.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Error at start/monitorize crashed process,
J1 Simón <=