Error: method "getMonitorData" does not exist
Not sure what's up:
Just tried to install [email protected] on Mac OS X 10.9 + Node v0.10.22.
When I do a simple pm2 list command, I get the following:
Error retrieving process list: Error: method "getMonitorData" does not exist
Any ideas?
Have you installed an older version of pm2 before ? A version < 0.6.x ?
Yes I have, but not exactly sure which version I had before. Also, the error faded away after a while, so all good now, but not sure why it was there in the first place - I don't think I did anything special to fix it.
Edit: I also did a fresh install of [email protected] on an unrelated EC2 instance, and all went fine there.
Got this error as well, I think it was caused by upgrading pm2 without killing the old daemon (v0.5). Killing all running daemons, removing the old version, and reinstalling the latest version fixed the issue for me.
Yes it was because you had an old version of pm2 (< 0.6)
To update pm2 :
$ pm2 dump
$ npm install -g pm2@latest
$ pm2 kill
$ pm2 resurrect
@Unitech hi, I update pm2 just follow your steps, but still error:
flyn:~ ijse$ pm2 status
Initializing folder for pm2 on /Users/ijse/.pm2
Creating PM2 configuration file in /Users/ijse/.pm2/custom_options.sh
method "getMonitorData" does not exist
flyn:~ ijse$ pm2 status
method "getMonitorData" does not exist
Any other options to kill pm2? If I try pm2 kill it does not work:
sudo pm2 kill
PM2 Killing pm2...
Error retrieving process list: Error: method "getMonitorData" does not exist
Please can you be more verbose, how can I help you with so little informations ?
https://github.com/Unitech/pm2/blob/master/CONTRIBUTING.md#contributing-to-pm2
In your comment (@Unitech) from Jan 10th you suggest to call "pm2 kill" and "pm2 resurrect" to deactivate the old version of pm2 and make the new one run.
The problem is that when I call "pm2 kill" it refuses to shut down, showing the same error that brought us here in the first place (getMonitorData does not exist).
So the question is, how should I kill the old pm2 to activate the new one? Should I just reboot the server? or kill the process from the terminal?
From which version did you upgraded PM2 ?
The hard way would be pm2 dump; pkill -f pm2; pm2 resurrect
Thanks for the super fast replies. I have 0.5.7 running, and the upgraded version I want to start is 0.9.5.
pm2 dump also shows "getMonitorData" does not exist. Should I just pkill, and then start the processes by hand?
Ah this is a very old version :p
Is it possible for you to just kill pm2 with pkill then start by hand the old processes? If not install back the 0.5.7, do a pm2 dump, install the new pm2 version then, pkill -f pm2, then pm2 resurrect
Thanks, I'll start them by hand :+1: