monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monit: 'Matching' functionality isn't working


From: Jan-Henrik Haukeland
Subject: Re: Monit: 'Matching' functionality isn't working
Date: Thu, 25 Jun 2015 00:42:40 +0200

The programs or scrips given to start, stop and restart are executed by Monit 
using exec, not a shell, and while it is perfectly fine to wrap the command in 
bash as you do, I would recommend to just use 

start program = “/mnt1/build/seeing/build/bin/run.sh”

The ’nohup’ and ‘&’ character used in your command should be removed as it 
redundant and also make bash fork unnecessary and create a new process. When 
Monit runs the program given in start, it will basically do the same as nohup 
and put the program in the background. No need to do this twice, maybe this is 
even the reason for the problem?

More help with debugging a program started from Monit can be found here, 
https://mmonit.com/wiki/Monit/FAQ#execution


> On 24 Jun 2015, at 23:27, Marie Mcallister <address@hidden> wrote:
> 
> Hi Martin,
> 
> Yes, that is what I tried as well, noted before.
> 
> "> I tried formatting it as such: start program = "/bin/bash -c 'nohup 
> /mnt1/build/seeing/build/bin/run.sh &'" but the same thing occurs."
> 
> It won't run this for some reason - when I check logs, it says:
> 
> [UTC Jun 24 21:25:05] error    : 'classification_node' process is not running
> 
> [UTC Jun 24 21:25:05] info     : 'classification_node' trying to restart
> 
> [UTC Jun 24 21:25:05] info     : 'classification_node' start: /bin/bash
> 
> [UTC Jun 24 21:25:35] error    : 'classification_node' failed to start
> 
> (Why does it stop at the whitespace after bash? This seems to be the issue.)
> 
> -Marie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]