[LRUG] Monit fails to stop/start/restart Mongrel
Andrew Stewart
boss at airbladesoftware.com
Fri May 30 03:40:16 PDT 2008
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
More information about the Chat
mailing list