[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
monit doesn't see pid file
From: |
Anthony Griffiths |
Subject: |
monit doesn't see pid file |
Date: |
Tue, 29 Nov 2016 17:46:29 +0000 |
I'm running centos 7 and I have a bash script that streams video, it's
called /etc/init.d/stream and it works fine. When started the stream
script produces a pid file at /var/run/stream.pid but monit for some
reason can't see the pid file and it keeps stopping and then
restarting the stream.
In /etc/monitrc I have this:
check process stream with pidfile /var/run/stream.pid
start program = "/etc/init.d/stream start" with timeout 10 seconds
stop program = "/etc/init.d/stream stop &&"
and when I do tail -f /var/log/monit.log I see this:
---------------------------
[GMT Nov 29 17:36:54] error : 'stream' process is not running
[GMT Nov 29 17:36:54] info : 'stream' trying to restart
[GMT Nov 29 17:36:54] info : 'stream' start: /etc/init.d/stream
[GMT Nov 29 17:37:44] error : 'stream' failed to start (exit status
0) -- /etc/init.d/stream: Starting service¦
Service started
[GMT Nov 29 17:38:14] error : 'stream' process is not running
[GMT Nov 29 17:38:14] info : 'stream' trying to restart
[GMT Nov 29 17:38:14] info : 'stream' start: /etc/init.d/stream
[GMT Nov 29 17:39:04] error : 'stream' failed to start (exit status
0) -- /etc/init.d/stream: Starting service¦
Service started
[GMT Nov 29 17:39:34] error : 'stream' process is not running
[GMT Nov 29 17:39:34] info : 'stream' trying to restart
[GMT Nov 29 17:39:34] info : 'stream' start: /etc/init.d/stream
[GMT Nov 29 17:40:25] error : 'stream' failed to start (exit status
0) -- /etc/init.d/stream: Starting service¦
Service started
[GMT Nov 29 17:40:55] error : 'stream' process is not running
[GMT Nov 29 17:40:55] info : 'stream' trying to restart
[GMT Nov 29 17:40:55] info : 'stream' start: /etc/init.d/stream
[GMT Nov 29 17:41:45] error : 'stream' failed to start (exit status
0) -- /etc/init.d/stream: Starting service¦
Service started
[GMT Nov 29 17:42:15] error : 'stream' process is not running
[GMT Nov 29 17:42:15] info : 'stream' trying to restart
[GMT Nov 29 17:42:15] info : 'stream' start: /etc/init.d/stream
[GMT Nov 29 17:43:05] error : 'stream' failed to start (exit status
0) -- /etc/init.d/stream: Starting service¦
Service started
(over and over and over)
----------------------------------
when the stream is running the pid file at /var/run/stream.pid is
always there because I've check it.
why can't monit see the pid file?
- monit doesn't see pid file,
Anthony Griffiths <=