pm2 list and sudo pm2 list both empty

1.2k Views Asked by At

I try pm2 list and results is no app (shinobi's camera and cron) is running. I try sudo pm2 list and results also shows no app is running.

But when I login as root by sudo su, and rerun pm2 list then it shows the app running. Why sudo pm2 list does not show? I thought sudo means run the pm2 as root?

How do I see pm2 app list in normal user?

1

There are 1 best solutions below

0
Dan Burdetsky On

I believe your pm2 configuration is saved for root only.

  1. Make sure to run your pm2 scripts with your standard user
  2. pm2 startup (and follow the instructions if you need your processes to start when the system boots)
  3. pm2 save