Thanks Martin. I noticed that if I try to run: start program = "memcached -d -p <%= memcache_port %> -P <%= current_path %>/tmp/pids/memcached.<%= memcache_port %>.pid"
I get an error that there is no such executable even though it is in /usr/bin. If I run this instead, it works: start program = "/bin/bash -c 'memcached -d -p <%= memcache_port %> -P <%= current_path %>/tmp/pids/memcached.<%= memcache_port %>.pid'" I'm not sure why that would happen if monit has /usr/bin in its default PATH. Thanks, Adam On Tue, Mar 1, 2011 at 7:42 AM, Martin Pala <[email protected]> wrote: > Monit purges the environment variables for security reasons and sets > spartan path: PATH=/bin:/usr/bin:/sbin:/usr/sbin > > You can log the output of executed script this way: > > start program = "/bin/bash -c '/usr/bin/myscript blabla >> > /tmp/myscript.out 2>&1'" > > Regards, > Martin > > > > On Mar 1, 2011, at 2:17 AM, Adam Tucker wrote: > > Hi. I'm attempting to troubleshoot a process that won't start under Monit. > I'm using a system-wide install of RVM and have followed all the steps > outlined in this thread: > > > http://groups.google.com/group/rubyversionmanager/browse_thread/thread/d1a6c1f6396a8bf6/279b6dacdf898d0a?#279b6dacdf898d0a > > None of the suggestions there worked for me, and I'm having trouble finding > any useful output to figure out why. I started Monit in verbose mode and > tailed the log, however the debug statements weren't very helpful. I got > stuff like this (path has been truncated with ...) : > > [EST Feb 28 20:13:26] info : 'resque_PO0' trying to restart > [EST Feb 28 20:13:26] debug : Monitoring disabled -- service resque_PO0 > [EST Feb 28 20:13:26] debug : monit: pidfile > '/opt/.../current/tmp/pids/resque.PO0.pid' does not exist > [EST Feb 28 20:13:26] debug : monit: pidfile > '/opt/.../current/tmp/pids/resque.PO0.pid' does not exist > [EST Feb 28 20:13:26] info : 'resque_PO0' start: > /usr/local/bin/rvm-shell > [EST Feb 28 20:13:26] debug : monit: pidfile > '/opt/.../current/tmp/pids/resque.PO0.pid' does not exist > (previous line repeats about 20 times) > [EST Feb 28 20:13:56] error : 'resque_PO0' failed to start > [EST Feb 28 20:13:56] debug : > ------------------------------------------------------------------------------- > [EST Feb 28 20:13:56] debug : monit() [0x40f53d] > [EST Feb 28 20:13:56] debug : monit(LogError+0x9f) [0x40fc8f] > [EST Feb 28 20:13:56] debug : monit(Event_post+0x31d) [0x40cd3d] > [EST Feb 28 20:13:56] debug : monit() [0x40ac4a] > [EST Feb 28 20:13:56] debug : monit(control_service+0xff) [0x40aeef] > [EST Feb 28 20:13:56] debug : monit(Event_post+0x3d9) [0x40cdf9] > [EST Feb 28 20:13:56] debug : monit(check_process+0xa1) [0x420fd1] > [EST Feb 28 20:13:56] debug : monit(validate+0x1e4) [0x421464] > [EST Feb 28 20:13:56] debug : monit(main+0xac7) [0x412397] > [EST Feb 28 20:13:56] debug : /lib/libc.so.6(__libc_start_main+0xfd) > [0x7f0473532c4d] > [EST Feb 28 20:13:56] debug : monit() [0x409e79] > [EST Feb 28 20:13:56] debug : > ------------------------------------------------------------------------------- > [EST Feb 28 20:13:56] debug : Monitoring enabled -- service resque_PO0 > > I'd like to see what the output was when Monit called the startup command. > Any way to do that? > > Thanks! > -- > To unsubscribe: > http://lists.nongnu.org/mailman/listinfo/monit-general > > > > -- > To unsubscribe: > http://lists.nongnu.org/mailman/listinfo/monit-general >
-- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
