pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

Error: method "getMonitorData" does not exist

Open jd327 opened this issue 13 years ago • 12 comments

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?

jd327 avatar Nov 23 '13 03:11 jd327

Have you installed an older version of pm2 before ? A version < 0.6.x ?

Unitech avatar Nov 25 '13 10:11 Unitech

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.

jd327 avatar Nov 25 '13 16:11 jd327

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.

alumowa avatar Dec 05 '13 23:12 alumowa

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 avatar Jan 10 '14 15:01 Unitech

@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

ijse avatar Jul 26 '14 10:07 ijse

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

hamoid avatar Jul 30 '14 09:07 hamoid

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

Unitech avatar Jul 30 '14 09:07 Unitech

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?

hamoid avatar Jul 30 '14 09:07 hamoid

From which version did you upgraded PM2 ?

The hard way would be pm2 dump; pkill -f pm2; pm2 resurrect

Unitech avatar Jul 30 '14 09:07 Unitech

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?

hamoid avatar Jul 30 '14 09:07 hamoid

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

Unitech avatar Jul 30 '14 09:07 Unitech

Thanks, I'll start them by hand :+1:

hamoid avatar Jul 30 '14 09:07 hamoid