Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running 'monit restart all' on command line was working yesterday

error: invalid action action= restart monit


Server Info

Ubuntu 16.04.4 LTS monit: Installed: 1:5.16-2ubuntu0.1

like image 480
Ninad Nehete Avatar asked Aug 14 '18 13:08

Ninad Nehete


People also ask

How do I restart monit?

Stop one of the monitored services, like nginx or node-app and wait for monit to restart it. Stop nginx. Wait 2 minutes. View the end of the monit log for when it restarted nginx.

How often does monit check?

By default, it is set up to check that services are running every 2 minutes and stores its log file in “/var/log/monit.

How do I enable monit service?

To enable the web interface you need to make changes in the monit configuration file. The main configuration file of monit located at /etc/monit. conf under (RedHat/CentOS/Fedora) and /etc/monit/monitrc file for (Ubuntu/Debian/Linux Mint).


1 Answers

This issue is for these monit commands

$ monit restart tomcat
$ monit stop tomcat
$ monit start tomcat
$ monit monitor tomcat
$ monit unmonitor tomcat

Reason:

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in monit (Ubuntu): status: New → Confirmed

for the time being, you need to revert the monit package to 1:5.16-2, try manually in a server with

sudo apt-get install monit=1:5.16-2

If your servers are automatically provisioned with some third party tool (chef, puppet, bash scripts, etc) then you would need to update them accordingly.

Source: https://bugs.launchpad.net/ubuntu/+source/monit/+bug/1786910

NOTE

In case you're facing this issue again even after downgrading Monit version, please blacklist it from unattended-upgrades service. It runs daily to fetch latest security updates for relative packages.

To blacklist monit, open "/etc/apt/apt.conf.d/50unattended-upgrades" and under "Unattended-Upgrade::Package-Blacklist" block, add "monit".

@TomDavies suggested a better solution than blacklisting, see the comments.

Do remember it to remove from blacklist once the issue is solved. You would need to run the above command again to revert back to older patch.

like image 178
Ninad Nehete Avatar answered Nov 05 '22 03:11

Ninad Nehete