monit-general
[Top][All Lists]
Advanced

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

Re: Always "Excution failed" to run "httpd".


From: blp330
Subject: Re: Always "Excution failed" to run "httpd".
Date: Thu, 8 Sep 2011 00:59:22 -0700 (PDT)



Jan-Henrik Haukeland wrote:
> 
> 
> On Sep 8, 2011, at 9:29 AM, blp330 wrote:
> 
>> Thank you. I tried this way before, and tried again. 
>> There was still no any output to /tmp/apache2_start.out, (even file not
>> created)
> 
> Make sure your original start program statement is fixed. You cannot write
> a script in your start/stop statement; Monit pass what you write here to
> exec. So in your original statement when you have,
> 
>   start program = "/usr/bin/env HOME=/home/nuwa
> /home/nuwa/webapps/unicorn/apache2/bin/start"
> 
> Monit will do exec on '/usr/bin/env' and the rest of the string is taken
> as argument to env. Not sure why you use the env call, but if you want to
> run this as a script you need to wrap it in a shell like,
> 
>  start program = "/usr/bin/bash -c 'HOME=/home/nuwa;
> /home/nuwa/webapps/unicorn/apache2/bin/start'"
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
> 
> 

Thank you. I have fixed that when I try to use /usr/bin/bash -c
I simply add a hard-code 
HOME=/home/nuwa
on top of my start script.

So start script is runnable, but only empty b.log and c.log generated.

-- 
View this message in context: 
http://old.nabble.com/Always-%22Excution-failed%22-to-run-%22httpd%22.-tp32415022p32421705.html
Sent from the monit-general mailing list archive at Nabble.com.




reply via email to

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