Skip to content

Better error message if PM2 is misconfigured / throwing EACCES error messages #3046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kevinburke opened this issue Jul 25, 2017 · 2 comments

Comments

@kevinburke
Copy link

If you configure/install PM2 as a root user, and then attempt to run any commands (help, version) as a non-root user, you get a cryptic error message:

$ pm2 --version
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: connect EACCES /home/ubuntu/.pm2/rpc.sock
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1063:14)

This is confusing. It would be better if pm2 could catch the error and report something like "Permission denied, double check you have not installed pm2 as root" or something.

@Unitech
Copy link
Owner

Unitech commented Aug 2, 2017

good idea

@Unitech
Copy link
Owner

Unitech commented Sep 15, 2017

Fixed on recently published pm2 (2.7.0):

$ npm install pm2@latest -g
$ pm2 update

Let me know if there is any issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants