Ruby Forum Rails deployment > monit fails to start/stop mongrel

Posted by Andy Koch (Guest)
on 29.04.2008 19:35
(Received via mailing list)
Hi,

Monit is not start/stop -ing my mongrels.  It's very distressing.

my monit config...

check process mongrel_8002 with pidfile /home/mongrel/apps/
stringsDB_internal_versions/shared/pids/mongrel.8002.pid
start program = "/usr/bin/mongrel_rails cluster::start -C /home/
mongrel/apps/stringsDB_internal_versions/current/config/
mongrel_cluster.yml --clean --only 8002"
stop program = "/usr/bin/mongrel_rails cluster::stop -C /home/mongrel/
apps/stringsDB_internal_versions/current/config/mongrel_cluster.yml --
clean --only 8002"

my monit log...

[PDT Apr 29 10:31:39] info     : 'mongrel_8001' trying to restart
[PDT Apr 29 10:31:39] info     : 'mongrel_8001' stop: /usr/bin/
mongrel_rails
[PDT Apr 29 10:32:43] error    : 'mongrel_8001' failed to stop

but...
I can run these cmds, as root, from shell and they work fine.  Thus I
suspect this is a shell issue.  But the log is not giving me any
actionable info.

Any ideas?

Help is greatly appreciated.

thanks
Posted by Andy Koch (Guest)
on 29.04.2008 19:56
(Received via mailing list)
Well, after some hack & error I found that if I plug..

ENV['GEM_HOME'] = "/usr/lib/ruby/gems/1.8/"

... into "/usr/bin/mongrel_rails", then it works as expected.

But changing gem installed files can't possibly be a good idea.  Is
there a way to set this env var within monitrc?
Posted by Killtest Com (killtestcom)
on 30.04.2008 09:14
KillTest. The safer,easier way to pass any IT exam. And help You to get 
IT CERT.
Posted by Killtest Com (killtestcom)
on 30.04.2008 09:16

KillTest. The safer,easier way to pass any IT exam. And help You to get 
IT CERT.CISCO CCNA CCNP MICROSOFT MCSE MCSE2008 IBM ORACLE EMC NORTEL 
ORACLE BEA LPI...
Posted by Killtest Com (killtestcom)
on 30.04.2008 09:17
Attachment: 94-31.gif (2,9 KB)
KillTest. The safer,easier way to pass any IT exam. And help You to get 
IT CERT.CISCO CCNA CCNP MICROSOFT MCSE MCSE2008 IBM ORACLE EMC NORTEL 
ORACLE BEA LPI...