Skip to content
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

Forever works locally but not on AWS server #943

Open
ThoseGuysInTown opened this issue Aug 8, 2017 · 1 comment
Open

Forever works locally but not on AWS server #943

ThoseGuysInTown opened this issue Aug 8, 2017 · 1 comment

Comments

@ThoseGuysInTown
Copy link

sudo node liveApp.js works as normal
forever start -a app.js works normally and the only difference between app.js and liveApp.js is that app.js is on port 3000.

When I'm trying to do forever start -a app.js:

myserver/project$ forever start -a liveApp.js
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: liveApp.js
myserver/project$ forever list
info:    Forever processes running
data:        uid  command             script     forever pid  id logfile                        uptime  
data:    [0] RX9S /usr/local/bin/node liveApp.js 8903    8909    /home/ubuntu/.forever/RX9S.log STOPPED 

Sometimes the forever process will show in forever list and not work when I send http calls to the server and sometimes in won't show up and will work when sending http calls to the server.

Please help! I have no idea what the difference that is causing the issue might be. :(

@markstos
Copy link

This appears to be a support request, not a bug report, and this issue can be closed. There was likely some environment difference here, such as different versions of forever, AWS Security group rules, different handling of privileged vs non-privileged ports, Mac vs Linux.

If you are running Ubuntu 16.04 on the remote server, you consider using systemd to manage the Node.js processes instead:

https://www.axllent.org/docs/view/nodejs-service-with-systemd/

systemd is already built into Ubuntu, can make sure the services are started at boot and automatically restart if the fail. You can check on the app status with systemctl status app instead of forever list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants