-
Notifications
You must be signed in to change notification settings - Fork 2.6k
2.9.0 - Generated init script set with incorrect PM2_HOME path #3356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Which amazon image exactly? We have not touched to initd.d script at all, we need to try this |
thanks bug reproduced and now fixed, publish will follow |
Unitech
added a commit
that referenced
this issue
Dec 14, 2017
published @2.9.1 |
To fix the issue: $ npm install pm2 -g
$ pm2 update
$ pm2 unstartup
[... line to copy paste ...]
$ pm2 startup
[... line to copy paste ...] |
inerc
pushed a commit
to inerc/pm2
that referenced
this issue
Feb 11, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's going wrong?
On Amazon Linux (AMI) the
pm2 startup ...
command generates an init script in which the PM2_HOME variable is set incorrectly (the value is set to--hp
param without/.pm2
appended).This is causing PM2 start up (resurection) on system reboot to fail as it does not find the dump.pm2 process file created using
pm2 save
.A side affect of this is that all PM2 runtime folders and files ending up in
--hp
on system init, manually starting PM2 (after sys start up, say pm2 kill & pm2 start cycle) these will he placed in--hp/.pm2
How could we reproduce this issue?
Replace
<your_user>
and<your_path>
as required/etc/init.d/pm2-app
. You should see the following line:Start your application and action the
pm2 save
command. It will save thedump.pm2
file to<your_path>/.pm2
Reboot system. You should find that PM2 is started but your applcation is not lauched as the init script seems to looking in
<your_path>
rather than<your_path>/.pm2
Supporting information
PM2 Version: 2.9.0
Node: v6.11.5
NPM: 3.10.10
Let me know if its worthwhile running
pm2 report
The text was updated successfully, but these errors were encountered: