Pm2: PM2 error: Error: Error: spawn ps ENOENT

Created on 26 Aug 2018  路  10Comments  路  Source: Unitech/pm2

pm2 version: 3.0.4
macOS High Sierra:10.13.2

after pm2 startup, the pm2 logs will who the error below every few seconds:

 PM2 error: Error: Error: spawn ps ENOENT

But the ps command is available either from the sudo user or the current user

stale

Most helpful comment

The error is gone after adding PATH variable from my user to "/Users/_User_/Library/LaunchAgents/pm2._user_.plist" file

All 10 comments

If I do not use the pm2 startup, everything is all right.

We had a similar problem with 3.0.3. exec(df -k $someDir) would fail with no such file or directory. Running the same script without pm2 did not result in this error.

Can confirm that v3.0.4 also exhibits this problem.

@heretogo @flohdot are you on mac os also?

No, we are using Debian on EC2.

I'm on a mac and having this issue also. For me I believe it has to do with user permissions. My /usr/local has been chowned by my account's user:group and not root, which PM2 may have been installed as.

If it's a permissions error, other than changing some ownership back to root, how should we go about fixing it?

Any updating about this issue @Unitech

Can you try that you indeed have access to the ps binary? It's mandatory on osx to retrieve process usage data.

The error is gone after adding PATH variable from my user to "/Users/_User_/Library/LaunchAgents/pm2._user_.plist" file

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psparago picture psparago  路  3Comments

alexpts picture alexpts  路  3Comments

rajendar38 picture rajendar38  路  3Comments

cchan picture cchan  路  3Comments

shaunwarman picture shaunwarman  路  3Comments