[Top][All Lists]

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

Re: [monit] How does start/stop/restart work ?

From: Jonathan Vanasco
Subject: Re: [monit] How does start/stop/restart work ?
Date: Sat, 7 Jun 2008 11:29:54 -0400

Thanks Marin.

Unfortunately, that doesn't seem to be it though.

I changed everything to absolute paths, and its still giving me a no starts and no error messages.

Is there any  way to trap errors and get more detailed reports?

On Jun 6, 2008, at 1:41 PM, Martin Pala wrote:


Monit sets spartan environment/sandbox ... see FAQ no.6:

6. Q: I'm having trouble getting monit to execute any "start" or
      "stop" program commands.  The log file says that they're being
      executed, and I can't find anything wrong when I run monit in
      verbose mode.

   A: Monit did start the program but for some reason the service dies
      later. Before we go on and introduce you to the fine art of
      system debugging, it's worth to note that:

      For security reasons monit purges the environment and only set a
      spartan PATH variable that contains /bin, /usr/bin, /sbin and
      /usr/sbin. If your program or script dies, the reason could be
      that it expects certain environment variables or to find certain
      programs via the PATH. If this is the case you should set the
      environment variables you need directly in the start or stop
      script called by monit.

Monit's working directory when running as deamon is "/". Since your scripts use relative path to the binary, it won't be found. The same problem is with the logfile.

If you'll set absolute paths, it should work fine.


reply via email to

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