[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Always "Excution failed" to run "httpd".
From: |
Martin Pala |
Subject: |
Re: Always "Excution failed" to run "httpd". |
Date: |
Wed, 7 Sep 2011 14:32:51 +0200 |
Hi,
you can wrap the command like this to get the output:
start program = "/bin/bash -c '/home/nuwa/webapps/unicorn/apache2/bin/start'
>>/tmp/apache2_start.out 2>&1"
Regards,
Martin
On Sep 7, 2011, at 12:39 PM, blp330 wrote:
>
> Hi,
>
> I am trying to use monit to run /usr/sbin/httpd.worker. I wrote a script to
> run it:
>
> =======================================================
> #!/bin/sh
>
> #httpd.worker -h > $HOME/webapps/unicorn/apache2/bin/b.log
>
> /usr/sbin/httpd.worker -f $HOME/webapps/unicorn/apache2/conf/httpd.conf -E
> $HOME/webapps/unicorn/apache2/bin/error.log -k start
> =======================================================
>
> My start script can be run even under:
> =======================================================
> sudo su
> env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/sh
> export HOME=/home/nuwa
> /home/nuwa/webapps/unicorn/apache2/bin/start
> =======================================================
>
> But I always got "Excution failed", my monit.conf:
> =======================================================
> check process unicorn with pidfile
> /root/webapps/unicorn/apache2/logs/httpd.pid
> start program = "/usr/bin/env HOME=/home/nuwa
> /home/nuwa/webapps/unicorn/apache2/bin/start" with timeout 60 seconds
> stop program = "/usr/bin/env HOME=/home/nuwa
> /home/nuwa/webapps/unicorn/apache2/bin/stop"
> =======================================================
>
> There are no any output to error.log, and even I wrote only this code in my
> start script:
> =======================================================
> /usr/sbin/httpd.worker -h > $HOME/webapps/unicorn/apache2/bin/b.log
> /usr/sbin/httpd.worker -h 2> $HOME/webapps/unicorn/apache2/bin/c.log
> =======================================================
>
> There are still no any output to b.log and c.log. It seems like httpd.worker
> failed to run.
> I have no idea to debug this situation,
>
> How can I make it work or debug this?
>
> Thanks.
> --
> View this message in context:
> http://old.nabble.com/Always-%22Excution-failed%22-to-run-%22httpd%22.-tp32415022p32415022.html
> Sent from the monit-general mailing list archive at Nabble.com.
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general