You misunderstood me. Try running your command * in the shell *
to test it first. You also get any error messages. So you should type:

# env -i /usr/bin/mongrel_rails start -d -e development -p 3003 -a
127.0.0.1 -P /home/seb/railsproject/cpericard/log/mongrel.3003.pid -c /
home/seb/railsproject/cpericard

and see how it works.

Setting "env -i" in the shell reproduces the environment used in  
monit, so it lets you test your command as if it was run by monit.

Gaspard

>
> Gaspard Bucher wrote:
>> Try running your start program without any environment variables (as
>> it is probably run by monit):
>>
>> # env -i /usr/bin/mongrel_rails start -d -e development -p 3003 -a
>> 127.0.0.1 -P /home/seb/railsproject/cpericard/log/mongrel.3003.pid - 
>> c /
>> home/seb/railsproject/cpericard
>>
>> Make sure "which mongrel_rails" gives
>> /usr/bin/mongrel_rails
>>
>> I had to use (debian)
>> /var/lib/gems/1.8/bin/mongrel_rails
>>
>> Gaspard
>
> that's better, monit is starting but ... not my rails app
>
> my monitrc file :
>
> -----
> set daemon 60
>
> set httpd port 2812 and
>    use address 127.0.0.1
>    allow 127.0.0.1
>
> check process mongrel-3003 with pidfile
> /home/seb/railsproject/cpericard/log/mongrel.3003.pid
>  start program = "/bin/env -i /usr/bin/mongrel_rails start -d -e
> development -p 3003 -a 127.0.0.1 -P
> /home/seb/railsproject/cpericard/log/mongrel.3003.pid -c
> /home/seb/railsproject/cpericard"
>  stop program = "/bin/env -i /usr/bin/mongrel_rails stop -P
> /home/seb/railsproject/cpericard/log/mongrel.3003.pid -c
> /home/seb/railsproject/cpericard"
> group mongrel
> ----
>
> [EMAIL PROTECTED] cpericard]# which mongrel_rails
> /usr/bin/mongrel_rails
> [EMAIL PROTECTED] cpericard]# /usr/local/bin/monit
> Starting monit daemon with http interface at [127.0.0.1:2812]
> [EMAIL PROTECTED] cpericard]# monit status
> The monit daemon 4.10.1 uptime: 0m
>
> Process 'mongrel-3003'
>  status                            Execution failed
>  monitoring status                 monitored
>  data collected                    Tue Oct  7 17:16:52 2008
>
> System 'seb'
>  status                            Monit instance changed
>  monitoring status                 monitored
>  load average                      [0.04] [0.07] [0.08]
>  cpu                               0.0%us 0.0%sy 0.0%wa
>  memory usage                      399392 kB [77.6%]
>  data collected                    Tue Oct  7 17:16:52 2008
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to