Monit and “unable to parse response” errors

Just upgraded a client’s monit installation on staging systems to 5.1.1 from 4.8.
After the restart of the new monit via /etc/init.d/monit stop; /etc/init.d/monit start, everything was fine, but some interactive commands reported “unable to parse response”
e.g. /usr/bin/monit restart all -g my_group
monit: action failed — unable to parse response

A quick google didn’t reveal much except the source code that generated the message, so thought I’d post in case it helps anyone else.
The source code showed it was from a piece of code connecting to the monit http status page.
So..telnet to that port on localhost, showed a banner from monit 4.8.
Apparently /etc/init.d/monit stop doesn’t stop all the bits of monit.
So /etc/init.d/monit stop again; kill the pid of the remaining process of monit; /etc/init.d/monit start.
A telnet to the port shows a banner from monit 5.1.1, and the monit restart command works fine now.

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word