error: invalid action action= restart monit
Server Info
Ubuntu 16.04.4 LTS monit: Installed: 1:5.16-2ubuntu0.1
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.
By default, it is set up to check that services are running every 2 minutes and stores its log file in “/var/log/monit.
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).
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With