Search code examples
node.jspm2

Nodejs pm2 with ubuntu not works after update


I have been running a nodejs server application that worked fine with pm2 but after updating my virtual box Ubuntu to 18.04.2 LTS. pm2 list shows that the server is online, but it is inaccessible when I go to the corresponding URL.

I tried to kill pm2, reinstall pm2 many times and reboot ubuntu, but still it is not working.

PM2 show that application online, so I have no errors to show. I made no changes on my nodejs application.

I can ping from outside to my virtual box.

If I initialize with pm2 start index.js or pm2 start --only serverName --env development works but this method is configured with localhost.

When I use pm2 start --only serverName --env production has the online status but not working and no errors.


Solution

  • I seems that the pm2 process was not really killed. I had to delete the project and clone again from the repository. Then it works (I tried before a git pull, but git tells me that it was the latest version)