pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

Error retrieving process list: Error: ENOENT, open '/proc/-1/stat'

Open bryanlarsen opened this issue 13 years ago • 14 comments

If I do a pm2 stopAll and a process doesn't actually stop, I get an output like this:

vagrant@vagrant:/srv/clara/current$ pm2 stopAll
⌬ PM2 Stopping all processes
  ◜ Processing...

┌────────────────┬────┬─────┬────────┬───────────┬─────────────────────┬────────┬────────────────────────────────────────────────┐
│ Script/Name    │ id │ PID │ status │ Restarted │ Last restart        │ memory │ err logs                                       │
├────────────────┼────┼─────┼────────┼───────────┼─────────────────────┼────────┼────────────────────────────────────────────────┤
│ processor      │ 3  │ -1  │ online │ 0         │ 2013-09-13 16:55:35 │        │ /home/vagrant/.pm2/logs/processor-err.log      │
├────────────────┼────┼─────┼────────┼───────────┼─────────────────────┼────────┼────────────────────────────────────────────────┤
│ command worker │ 4  │ -1  │ online │ 0         │ 2013-09-13 16:55:36 │        │ /home/vagrant/.pm2/logs/command worker-err.log │
├────────────────┼────┼─────┼────────┼───────────┼─────────────────────┼────────┼────────────────────────────────────────────────┤
│ upload worker  │ 5  │ -1  │ online │ 0         │ 2013-09-13 16:55:36 │        │ /home/vagrant/.pm2/logs/upload worker-err.log  │
├────────────────┼────┼─────┼────────┼───────────┼─────────────────────┼────────┼────────────────────────────────────────────────┤
│ email worker   │ 6  │ -1  │ online │ 0         │ 2013-09-13 16:55:36 │        │ /home/vagrant/.pm2/logs/email worker-err.log   │
└────────────────┴────┴─────┴────────┴───────────┴─────────────────────┴────────┴────────────────────────────────────────────────┘

any subsequent invocation of pm2 status or pm2 start or similar gives the error:

Error retrieving process list: Error: ENOENT, open '/proc/-1/stat'

bryanlarsen avatar Sep 13 '13 17:09 bryanlarsen

This, is, really strange (vagrant fault ?) :p

Can't know, not enough informations (system, node version...)

Unitech avatar Sep 21 '13 11:09 Unitech

I get the same thing on pm2 monit, the process drops with the following error. Mac OSX 10.8.5, Node v0.8.17

⌬ PM2 monitoring :

server.coffee [8002] [|||||||||||| ] 40 % [|||| ] 22.191 MB

Error retrieving process list: Error: Command failed:

sagish avatar Oct 15 '13 07:10 sagish

Same here on OS X 10.8.5

$ > node --version
v0.10.20
$ > npm --version
1.3.11
$ > pm2 --version
0.5.7

sbstjn avatar Oct 16 '13 08:10 sbstjn

Also on CentOS:

pm2 list
Error retrieving process list: Error: ENOENT, open '/proc/41667/stat'
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.4 (Final)
Release:    6.4
Codename:   Final
node --version
v0.10.7
pm2 --version
0.6.3

zuk avatar Oct 21 '13 20:10 zuk

Same thing on archlinux, first start went fine then it fails now

vvo avatar Oct 24 '13 14:10 vvo

The Error retrieving process list: Error: ENOENT, open '/proc/41667/stat seems to happen when the underlying process is spawning and immediately dying. Would be nice to get pm2 to behave better under these conditions. I'll try to take a crack at this at some point.

zuk avatar Oct 24 '13 15:10 zuk

Same on centos 6.4:

$ pm2 list
Error retrieving process list: Error: ENOENT, open '/proc/0/stat'
$ node --version
v0.10.21
$ pm2 --version
0.6.3

pm2 is awesome, please let me know if there is anything I can do to help diagnose or fix this issue.

joegoggins avatar Oct 28 '13 22:10 joegoggins

Also on CentOS

# pm2 list
Error retrieving process list: Error: Error: ENOENT, open '/proc/28012/stat'
# node -v
v0.10.24
# pm2 --version
0.7.0

looveu avatar Jan 13 '14 06:01 looveu

When you get an error like that Error retrieving process list: Error: Error: ENOENT, open '/proc/28012/stat' it's that your process is on restart infinite loop. Just retry 5-10 seconds after, the process should be stopped.

Unitech avatar Jan 13 '14 18:01 Unitech

Got 4 servers running up, Ubuntu 12.04, node 0.10.24

Have the same error on 2 machines, even after 30 mins

tarun1793 avatar Feb 03 '14 21:02 tarun1793

@Unitech, I have the infinite loop and it's not stopping wether I retry 5-10 seconds after or a minute. Is there any way to forcebly kill the process?

reydelleon avatar Feb 04 '14 16:02 reydelleon

pm2 kill

works for me

On Tue, Feb 4, 2014 at 10:28 PM, Reydel Leon [email protected]:

@Unitech https://github.com/Unitech, I have the infinite loop and it's not stoping wether I retry 5-10 seconds after or a minute. Is there any way to forcebly kill the process?

Reply to this email directly or view it on GitHubhttps://github.com/Unitech/pm2/issues/77#issuecomment-34081132 .

tarun1793 avatar Feb 04 '14 17:02 tarun1793

Thanks @tarun1793, it works for me too.

reydelleon avatar Feb 04 '14 18:02 reydelleon

@tarun1793 works for me too... tks

izidorome avatar Feb 07 '14 15:02 izidorome