[Top][All Lists]

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

Re: Execution failed

From: Martin Vaner
Subject: Re: Execution failed
Date: Thu, 10 Jul 2014 10:08:59 +0200
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi Martin,

The absolute path is not working too in version 5.4 (debian repo), so i will update my monit instance and remake my script.
Thank you for tip.

Thanks a lot,


On 10. 7. 2014 9:49, Martin Pala wrote:

Monit <= 5.7 purges the environment variables and sets only spartan 
PATH="/bin:/usr/bin:/sbin:/usr/sbin" + set of MONIT_* variables (documented in the 
manual) ... this was done to run the program in a sandbox and not pass any extra 
informations from parent process environment to child, but caused problems in some cases, 
where the script depends on environment settings.

For example your script doesn't use absolute paths ... if "java" is not in the 
above mentioned PATH, then it won't be found.

=> Monit upgrade to 5.8 or later should fix it ... alternatively you can load 
the environment in the script or define required environment variables and/or use 
absolute path.


On 09 Jul 2014, at 19:04, Martin Vaner <address@hidden> wrote:

Hi there.
I just have a little problem. Monit does not want to start my bash script, and i do not 
know why, monit is saying only "Execution failed" so i cant identify what is 
causing my problem.

Information about script:

if [ -f /home/sms/vouchers/ ]
echo 'process already running'
java -Xmx1024m -jar jacon2.jar &
pid_number=`ps -e -o pid,command | grep "jacon2.jar" | grep -v "\<grep\>"`
echo $pid_number >

File permissions:
-rwxr-xr-x 1 sms sms 256 Jul  9 16:46

Monit config file:
check process contego with pidfile /home/sms/vouchers/
     start program = "/home/sms/vouchers/"
           as uid "sms" and gid "sms"
     stop program = "/home/sms/vouchers/"
           as uid "sms" and with gid "sms"

When i run my script directly from console, the script is working without any 
This is another problem what i have encountered before.

Thank you for tips.

Regards, Martin
To unsubscribe:

To unsubscribe:

reply via email to

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