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

Alex Tomlins alex at tomlins.org.uk
Fri May 30 04:56:03 PDT 2008


Strange...  I didn't actually use the --clean option for the stop 
command (although the docs say it should work...). 

I'm not sure how useful it is when stopping anyway, as long as it's used 
when starting.

The only other difference I can see is a trailing / on your path 
statement for the stop command, but I would be surprised if that makes 
any difference....

Alex

Andrew Stewart wrote:
>
> 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
>
>
>
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
> !DSPAM:3,483fe9a368503442511932!
>
>

-- 
Alex Tomlins
Email/Jabber: alex at tomlins.org.uk

There are two kinds of people in the world: those who finish what they started




More information about the Chat mailing list