Open MarvelousWololo opened 6 years ago
@MarvelousWololo I've hit the same issue... I'll post back if I discover anything.
@MarvelousWololo I ended up shutting down my server and starting it back up... once I did this everything seemed to be working fine.
I had the same issue with the same fix @corywheeler -- I had just barely set up a new ubuntu 18.04 box, and had never rebooted it.
I had the same issue as @corywheeler and @eegrok. I was able to get things working after a reboot. For those unfamiliar with the command it is: sudo reboot
@corywheeler, same here, after the reboot everything works OK. (spend two days on it...) Thanks!
I had the same issue. But after run command showed below, pm2 startup systemd started with no error :-)
ps aux | grep pm2 | grep -v grep | awk '{print $2}' | xargs kill -9
@harupu : It works for me also
@harupu worked for me as well :pray:
@harupu It has also worked for me Thank you
@harupu: also worked for me. many thx
Worded for me too
I had the same issue. But after run command showed below, pm2 startup systemd started with no error :-)
ps aux | grep pm2 | grep -v grep | awk '{print $2}' | xargs kill -9
Worked for me without the need to restart my server, thank you.
Didn't try the ps command, but the reboot worked for me :3 Thanks!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Dude, after hours of debugging, restart works! thanks mate
Great. It works for me too.
I had the same issue. But after run command showed below, pm2 startup systemd started with no error :-)
ps aux | grep pm2 | grep -v grep | awk '{print $2}' | xargs kill -9
tnx alot
I had the same problem with ubuntu 16, I need to execute pm2 resurrect every time my server has rebooted.
I had the same issue. But after run command showed below, pm2 startup systemd started with no error :-) ps aux | grep pm2 | grep -v grep | awk '{print $2}' | xargs kill -9
This is the same as pm2 kill
right? - just kill the pm2 master process.
Job for pm2-wololo.service failed because the service did not take the steps required by its unit configuration. See "systemctl status pm2-wololo.service" and "journalctl -xe" for details.
This basically means the pm2 master process should be launched by the systemd, so it can manage it. But in most cases, if you follow the tutorial the master process is launched by yourself. That explains why it works after a restart/kill the master process - you get no pm2 running and the systemd can take over.
I suppose the correct steps to set up your server are:
pm2 kill
to kill the master process if it launched already.pm2 startup systemd
.sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u USERNAME --hp /home/USERNAME
sudo service pm2-USERNAME start
, now you have a pm2 master process managed by systemd. You can verify it with service pm2-USERNAME status
.pm2 start your-ecosystem.file
to start your apps.pm2 save
to save your app configuration to /home/USERNAME/.pm2
, so systemd launched pm2 master process can resume it from after a server restart. @favoyang Thank you, That worked for me very well
@favoyang works like a charm, thank you!
I had the same issue and resolved with: pm2 kill rm -rf node_modules npm i pm2 start index.js
sudo shutdown -r now
I had the same issue. But after run command showed below, pm2 startup systemd started with no error :-)
ps aux | grep pm2 | grep -v grep | awk '{print $2}' | xargs kill -9
it is work for me than you
worked for me after reboot the server
@MarvelousWololo I ended up shutting down my server and starting it back up... once I did this everything seemed to be working fine.
Rebooting the server worked for me, too.
@harupu you save my time 😄
It seems killing the pm process is the same way as a reboot. Anyway thanks.
Worked as expected after reboot server
I had the same issue as @corywheeler and @eegrok. I was able to get things working after a reboot. For those unfamiliar with the command it is:
sudo reboot
Thanks you Saved my day ^_^
Reboot worked for me
I had the same issue. But after run command showed below, pm2 startup systemd started with no error :-)
ps aux | grep pm2 | grep -v grep | awk '{print $2}' | xargs kill -9
this wroked for me in combination with the below
sudo su
systemctl start pm2-USERNAME
ausearch -c 'systemd' --raw | audit2allow -M my-systemd semodule -i my-systemd.pp
systemctl start pm2-USERNAME
ausearch -c 'systemd' --raw | audit2allow -M my-systemd semodule -i my-systemd.pp systemctl start pm2-USERNAME
systemctl status pm2-USERNAME
감사합니다
What's going wrong?
How could we reproduce this issue?
Following this guide https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04
Supporting information