[LRUG] Monit fails to stop/start/restart Mongrel

Andrew Stewart boss at airbladesoftware.com
Fri May 30 04:48:44 PDT 2008


On 30 May 2008, at 12:25, Alex Tomlins wrote:

> Have you tried putting user and group in your mongrel config as  
> suggested by Geir...
>
> When I finally got it working, I had the deployment user and group  
> in the mongrel conf, and the monit start and stop commands as below.  
> (this was on Solaris btw...)
>
> If that doesn't work, do you want to post your full monit config,  
> and I'll see if I can see anything else..

I added user and group to the cluster config as Geir suggested.

I now find that this start command works:

'/usr/bin/env PATH=/usr/local/bin:$PATH mongrel_rails cluster::start - 
C /etc/mongrel_cluster/photocms.conf --clean --only 8002'

But the corresponding stop command fails:

'/usr/bin/env PATH=/usr/local/bin/:$PATH mongrel_rails cluster::stop - 
C /etc/mongrel_cluster/photocms.conf --clean --only 8002'

Weird.

By the way, I have also noticed that replacing cluster::start/stop  
with start/stop, and adjusting the arguments appropriately, does  
work.  It's less convenient than using the cluster command...but it  
works:

Start: '/usr/local/bin/ruby /usr/local/bin/mongrel_rails start -d -e  
production -a 127.0.0.1 -c /var/www/apps/photocms/current -p 8002 -P / 
var/run/mongrel_cluster/photocms.8002.pid -l log/mongrel.8002.log -- 
user deploy --group users'

Stop: '/usr/local/bin/ruby /usr/local/bin/mongrel_rails stop -P /var/ 
run/mongrel_cluster/photocms.8002.pid'

So I think I'll use the cluster::start form for as the start command,  
and the stop (rather than cluster::stop) as the stop command.  I would  
rather use cluster::stop to get the cleaning functionality, but  
something is better than nothing.

Is it still worth posting my monit config?  I'm happy to do so.

Thanks for the suggestions.

Regards,
Andy Stewart

-------
AirBlade Software
http://airbladesoftware.com







More information about the Chat mailing list