linuxubuntugithubpm2github-actions-self-hosted-runners

Error: RROR] Process or Namespace not found. PM2 Error Linux Server with github actions


I recently updated my self-hosted linux server on compute engine. Pm2 had been working perfectly along my github actions previously. However after update when i restart a pm2 instance from my ssh terminal it works fine. But when I try to restart pm2 instance from github actions jobs then it throws me this error. I've uninstall and reinstalled pm2 but still the same error. Previously it worked fine but now it shows me this error.

So if i run the github action then this error shows enter image description here

But when i run the same command from ssh termianl connected to my server then it works fine enter image description here

Any help would be appreciated


Solution

  • This problem may be caused by not setting the environment variable PM2_HOME correctly.

    Problems I encountered

    Two solutions

    1. Temporarily set PM2_HOME: PM2_HOME='<your pm2 home>' pm2 <command>
    2. Setting PM2_HOME in .bashrc/.shrc/.zshrc

    Way to find PM2_HOME location of a running PM2 thread