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

Muhammad Iqbal
  • 391
  • 1
  • 2
  • 9

5 Answers5

15

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

Muhammad Iqbal
  • 391
  • 1
  • 2
  • 9
  • 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 '19 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 pm2@2.5

Hamid Reza
  • 150
  • 1
  • 5
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

Dharman
  • 30,962
  • 25
  • 85
  • 135
Necromancer
  • 869
  • 2
  • 9
  • 25
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.

Justin
  • 474
  • 4
  • 14