[Top][All Lists]

[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 01:56:15 +0200

One other thing, monit sets a very spartan environment PATH [1] when it execute a program. If the program or script expect to find stuff via the PATH it may fail. In that case set the path in the script directly instead of relying on the environment.


Best regards
Jan-Henrik Haukeland

On 28. aug. 2007, at 01.44, Jan-Henrik Haukeland wrote:

Make sure you are using the latest monit version, 4.9 or 4.10 beta. There has been changes that can have been fixed.

Also if the program you try to execute is a script make sure that the script starts with #! for instance #!/bin/bash This is important! otherwise the execv(3) library function used by monit may refuse to execute the script. And of course, make sure that the script or program is executable, i.e. has the executable bit set.

Best regards
Jan-Henrik Haukeland

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

On 8/27/07, Martin Pala <address@hidden> wrote:

Michael Steinfeld wrote:
On 8/27/07, Jovan Kostovski <address@hidden> wrote:
On 8/27/07, Michael Steinfeld <address@hidden> wrote:
Am I missing something here?

set httpd port 28212 and
    #use address   # only accept connection from localhost
allow localhost # allow localhost to connect to the server and allow admin:password # require user 'admin' with password 'monit'
set httpd port 28212
    allow localhost
    allow admin:password

tried that it didn't help. I have no problem getting access to the web interface of monit. That's all fine. But when I attempt to stop/ start
any of my services *nothing*.

don't add "and" after the port number. If this doesn't work
Check if that port (if it's not a typo, the default port is 2812)
is not used by some other service or it's blocked on firewall.

I have it on that port and it is not blocked for certain.

Any other ideas???? Thanks.

Monit CLI is using the monit http to request the action. Is it using the same monitrc (configuration file) as the monit daemon? You can run both
- monit daemon and CLI in verbose monde, using -v option and check
output and logs.

You can use sniffer to check the traffic between monit CLI and daemon (tracing localhost:28212 should be sufficient) and check for reset/rejects.

You can also try to connect to localhost:28212 for example using telnet
and check if the connection works.

did that, everything looks good. Let me be a little clearer. When I
try to use http://server:port and click on any service and restart it,
nothing happens and I get an email that said "Can't execute" when I
use the CLI and add -v that is how I saw the errors I posted above.


To unsubscribe:

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

To unsubscribe:

To unsubscribe:

reply via email to

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