Skip to content

Running with pm2 on ec2, need advice #833

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

Closed
jordanbaucke opened this issue Feb 17, 2015 · 0 comments
Closed

Running with pm2 on ec2, need advice #833

jordanbaucke opened this issue Feb 17, 2015 · 0 comments

Comments

@jordanbaucke
Copy link

So after giving up on running my app on Heroku or Openshift due to errors: #796 & #766

I've been working on deploying on ec2 w/ and running behind an NGINX proxy - using a fork of: https://github.com/bevacqua/grunt-ec2

I've got most of the rsync reconfigured to copy just the /dist folder and do all the linking, etc. but when I run pm2 start /srv/apps/ec2/current/server/app.js (https://github.com/Unitech/pm2) or node /server/app.js I get:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect EACCES
    at errnoException (net.js:904:11)
    at Object.afterConnect [as oncomplete] (net.js:895:19)

Assuming this is an issue with the port or the ip address that is getting set in the configuration? I want the server to listen on 127.0.0.1:9000 for the proxy.

I can start the app by just copying it to my instance, and running grunt serve:dist so I no it's not a conflict, etc.

Any advice on how I can configure the config and call the commands to appropriately start the server in production mode?

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

1 participant