-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Amazon EC2 : saved PM2 configuration is not recognized at startup (when running pm2 in user mode) #1100
Comments
Analysis
|
Fix proposal
|
Here it is
=> restarting the Amazon EC2 instance |
Argggg, I am now getting the EACCES error
Several opened issues mention this error => seems I am not the first one to take this path...
|
I don't have a direct access right now but search through issues I remember
|
Diagnostic :
[ec2-user ~]$ ls -alg .pm2/
|
My guess :
Next :
|
Same problem for me on Ubuntu. I run my pm2 as the "web" user and rely on pm2 config stored in /home/web/.pm2. However, when I run "pm2 startup ubuntu -u web" as root my script has PM2_HOME set as /root/pm2 and my config is not found. ObjectIsAdvantag's fix proposal looks reasonable to me. |
I found the solution. The script for centos and amazon linux are very similar, but the latter had not been updated to switch to "ec2-user" before any command. Here's my solution:
|
may worth checking new upstart system. I recommend systemd though (available on ubuntu 16.x by default) |
Check #2559, available on PM2 2.2.x |
Scenario
The text was updated successfully, but these errors were encountered: