Monit fails to start a Java process that is launched from an init script in /etc/init.d. The init script works when launched from the shell. Monit detects that the service is running and detects when the service is down.

Error message from /var/log/monit:

[UTC Aug 17 22:48:37] info     : 'fanpoint-service' start: /etc/init.d/java-service
[UTC Aug 17 22:49:07] error    : 'fanpoint-service' failed to start (exit status -1) -- no output

$monit -vv status fanpoint-service
Process 'fanpoint-service'
  status                            Execution failed
  monitoring status                 Monitored
  data collected                    Wed, 17 Aug 2016
  • Is monit running as root? – user1700494 Aug 18 '16 at 7:30
  • Yes monit is running as root. Monit is successfully monitoring several other services. – jk73 Aug 18 '16 at 15:12


This doesn't work start program = "/etc/init.d/java-service start"

This did work start program = "/bin/bash -c '/etc/init.d/java-service start'"

Monit Documentation. https://mmonit.com/wiki/Monit/FAQ#execution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.