Tuesday, September 11, 2012

Reinitializing monit daemon monit: No daemon process found

So here is the issue I faced today:
$ sudo monit reload
Reinitializing monit daemon
monit: No daemon process found
However "monit -Iv" would show monit able to read the configuration file and send alerts correctly.

As monit is installed as a service if such service is stopped the reload command would do nothing. So first the service should have been started:
sudo service monit start
The way monit restarts automatically is through a /etc/init.d/monit which sources the /etc/default/monit where in turn "startup=1" sets if monit should automatically start after system reboot.

As a reminder "/usr/sbin/service " is equivalent to call "/etc/init.d/ " so the below is perfectly fine as well:
sudo /etc/init.d/monit restart
There is one word of advise though. If you faced this issue be sure 'which monit' resolves to the same monit version in use when you call monit as a service. I have found dual installations in /usr/bin and /usr/local/bin perhaps related to ".configure" problems when installing monit from sources.

No comments:

Followers