serverubuntu-16.04monit

Running 'monit restart all' gives invalid action


error: invalid action action= restart monit


Server Info

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


Solution

  • 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.