monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: frustrated monit not executing processes


From: Jan-Henrik Haukeland
Subject: Re: frustrated monit not executing processes
Date: Tue, 28 Aug 2007 14:38:41 +0200

There must be something in the '/usr/local/bin/mongrel_rails' script that expect /usr/local/bin/ to be in the PATH, which it isn't when monit execute. Looks like mongrel_rails calls itself without any path prefix.

This is easy to test, just export this path to the shell, which is the PATH monit sets "export PATH=/bin:/usr/bin:/sbin:/usr/sbin" and see if /usr/local/bin/mongrel_rails now works, it should not. You need to remove the link "/usr/local/bin/mongrel_rails -> /usr/bin/ mongrel_rails" if you actually want to do the test.

To solve this, the trick is either to set the link as you did or better, add extra PATH info to the mongrel_rails script. Assuming its a ruby script put something like this at or near the top of the script.

ENV['PATH'] = "#{ENV['PATH']}:/usr/local/bin";


Best regards
--
Jan-Henrik Haukeland


On 28. aug. 2007, at 05.44, Michael Steinfeld wrote:

well maybe this is an env issue, however why would that matter if I
explicitly setting the path to mongrel in my monitrc
"/usr/local/bin/mongrel_rails etc.."

I completely understand up setting env variables, but it makes no
sence to me when you explicitly set the path.

hmpf

On 8/27/07, Alexey Verkhovsky <address@hidden> wrote:
On 8/27/07, rory <address@hidden> wrote:
Sounds like a path/environment problem to me.

Ditto. /usr/local/bin is not on PATH in RHEL 4.

Michael: have you heard of / tried the RubyWorks package (link in the
sig)? It's just what the doctor prescribes for RHEL 4, even if I say
so myself.

--
Alexey Verkhovsky
CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com]
RubyWorks [http://rubyworks.thoughtworks.com]


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general



--
Michael Steinfeld
Linux Admin/Developer
AIM: mikesteinfeld
GTALK: address@hidden


--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general





reply via email to

[Prev in Thread] Current Thread [Next in Thread]