14

I've been following this issue and till now my problem not solved, anyone can help? Any command of pm2 always returned

[PM2] Spawning PM2 daemon with pm2_home=/home/$USER/.pm2

Thanks

0

5 Answers 5

15

I'm installing node using snap, that's why it didn't work, but it's working now if you install manually, cheers.

1
  • 4
    Hello @Muhammad Iqbal - I am having the same issue. However, I only install node manually. Did you learn anything that might help?
    – 208_man
    Jan 11, 2019 at 15:00
13

You need to either update Node to a newer version or downgrade PM2 to an older version. This solved the issue:

npm uninstall -g pm2 npm install -g [email protected]

2
2

I am having this issue on window 10 but can't solve problem by uninstall and reinstall pm2.

Finally I found a solution.

Run your command prompt (or) PowerShell as an Administrator

2

In my case, directory permission wasn't defined correctly for customized PM2_HOME setting

I changed pm2_home as follows:

# ~/.bashrc
export PM2_HOME="/var/www"

The problem was that the current user has no permission to write on /var/www directory. So I changed the directory permission in order to fix it.

Tips:

  • I created pub.sock and rpc.sock (e.g touch pub.sock) manually when I see the error axon:sock Got error while trying to bind Error: listen EACCES: permission denied /var/www/pub.sock from pm2.log
  • But when I run DEBUG=* pm2 ls, it makes the CPU over 100% by writting pm2.log (axon:sock Got error while trying to bind Error: listen EACCES: permission denied /var/www/pub.sock)
  • So create pub.sock and rpc.sock manually!
0

I experienced this when my disk was full.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.