Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.61k stars 2.62k forks source link

PM2 save doesn't seem to be working #1035

Closed memphisraynz closed 7 years ago

memphisraynz commented 9 years ago

I am running centos7 and have just installed PM2. Added a service "pm2 start app.js --name lets-chat" which starts the program and its working fine. But after running pm2 startup centos and the pm2 save, upon reboot there is nothing list when I run pm2 list.

I'm not sure I am doing something wrong or if there is a bug.

Thanks

RicardoZap commented 2 years ago

Una disculpa por comentar en español en un foro en Inglés pero encontré la solución al problema. Ami me funcionó ejecutando el siguiente método: 1.- pm2 start "ejemplo.js" 2.- pm2 save 3.- pm2 startup 4.- sudo env PATH=$PATH:/usr/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi Después de ejecutar lo anterior hacer un "sudo reboot" y con eso el problema queda resuelto. Saludos.

  • Tendrás alguna equivalencia para Windows?
  • Do you have any similar process for Windows?

por el momento no, amigo, PM2 lo utilicé hace 2 años para realizar un proyecto en raspberry :(

kutovoy commented 6 months ago

same issue:

  1. pm2 startup and pm2 save were executed. pm2 "saved the list of processes"
  2. container was restarted due to power outage or a simple "reboot" command. pm2 would say that the list of processes is not in sync after container restart
  3. pm2 does not restart processes automatically. "pm2 resurrect" will bring missing processes back up running.

pm2 version is 5.3.1 Ubuntu 20.04.6 LTS container

so far pm2 seems to be quite abandoned to me, neither autostart nor ability to monitor logs live with "pm2 monit" features are working.

Mrgaton commented 1 week ago

happends again in bun beta @Unitech