[LRUG] Monit fails to stop/start/restart Mongrel
Alex Tomlins
alex at tomlins.org.uk
Fri May 30 04:09:21 PDT 2008
Try using the following as your command:
/usr/bin/env PATH=/usr/local/bin:$PATH mongrel_rails cluster::start -C
/etc/mongrel_cluster/photocms.conf --clean --only 8002
I think the problem comes when mongrel_rails tries to spawn mongrel
which also needs the path to ruby... using env as above adds
/usr/local/bin to the path so everything can find it...
hope that helps..
Alex
Andrew Stewart wrote:
> Hi El Rug,
>
> I have monit 4.10.1 running on a Slicehost Ubuntu box. Unfortunately
> I cannot figure out why it fails to stop/start/restart my Mongrels.
>
> I have a cluster of 3 Mongrels, running on ports 8000, 8001 and 8002.
> They are (supposed to be) owned by the deploy user. For this
> exercise, I'm trying to stop and start the one on 8002, using monit's
> web interface.
>
> Here's the stop program monit is trying and failing with:
>
> '/usr/local/bin/ruby /usr/local/bin/mongrel_rails cluster::stop -C
> /etc/mongrel_cluster/photocms.conf --clean --only 8002'
>
> I can copy and paste that onto the command line, where it works
> perfectly.
>
> Monit apparently runs with a lean path, which is why I added
> /usr/local/bin/ruby to the start of the command above.
>
> Monit runs as root.
>
> Here's the mongrel_cluster configuration:
>
> ---
> cwd: /var/www/apps/photocms/current
> log_file: log/mongrel.log
> port: "8000"
> environment: production
> address: 127.0.0.1
> pid_file: /var/run/mongrel_cluster/photocms.pid
> servers: 3
>
> It doesn't specify user or group. I tried to set the user to deploy,
> but it turns out that you need to specify a group as well. It looks
> like the deploy user doesn't belong to any groups, so I tried to
> create a deploy group and add the user to it -- but that didn't seem
> to work. Not sure why not, and I stopped pursuing this avenue.
>
> I'm running monit in verbose mode but it still won't say why execution
> fails.
>
> Any ideas?
>
> Regards,
> Andy
>
> -------
> AirBlade Software
> http://airbladesoftware.com
>
>
>
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
> !DSPAM:3,483fd99868501657313003!
>
>
--
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