Hi, When launched, no environnement variables come with. It is a very common issue in monit.
I guess monit autors may highlight this a bit more in documentation. you have to load your env by doing a program = "/bin/su - user -c '/usr/local/bin/ruby ... ' " Hope that can help.
Hello! I'm setting up monit to watch on few Ruby scripts, and it cannot start them: Jun 11 20:54:29 monit[23514]: 'ar_sendmail' process is not running Jun 11 20:54:29 monit[23514]: 'ar_sendmail' trying to restart Jun 11 20:54:29 monit[23514]: 'ar_sendmail' start: /usr/local/bin/ruby Jun 11 20:54:59 monit[23514]: 'ar_sendmail' failed to start Jun 11 20:54:59 monit[23514]: 'delayed_job' process is not running Jun 11 20:54:59 monit[23514]: 'delayed_job' trying to restart Jun 11 20:54:59 monit[23514]: 'delayed_job' start: /usr/bin/env Jun 11 20:56:39 monit[23514]: 'delayed_job' failed to start config file: check process ar_sendmail with pidfile "/sites/mysite/shared/log/ar_sendmail.pid" start program = "/usr/local/bin/ruby /usr/local/bin/ar_sendmail -d -b 100 --max-age 0 --delay 60 -e production --chdir /sites/mysite/current start" with timeout 30 seconds stop program = "/usr/local/bin/ar_sendmail -e production --chdir /sites/gamer.ru/current stop" if 5 restarts within 5 cycles then alert check process delayed_job with pidfile "/sites/mysite/shared/pids/delayed_job.pid" start program = "/usr/bin/env RAILS_ENV=production /sites/mysite/current/script/delayed_job start" with timeout 100 seconds stop program = "/sites/mysite/current/script/delayed_job stop" if 5 restarts within 5 cycles then alert Is it possible to know why scripts failed to start? I like to see output... Thank you! -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
-- Salutations - Best regards - mit freundlichen Grüssen ----------------- [email protected] ------------------------------------ fr - Merci d'utiliser cette addresse pour le support ou question technique en - Please use this address for any support or technical question ----------------- https://support.numlog.fr -------------------------------- fr - Privilégier la gestion de ticket d'incident (Clients NUMLOG) en - Prefere our trouble ticket application (NUMLOG's customers) -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
