Skip to content

Uptime run at Heroku.com #37

Closed
abtris opened this Issue Aug 13, 2012 · 4 comments

4 participants

@abtris
abtris commented Aug 13, 2012

I try run heroku.

I updated package.json with engines:

"engines": {
    "node": "0.6.x",
    "npm":  "1.0.x"
},

add start:

"scripts": {
    "start": "node app.js"
}

Compilation is ok.

Application throw 503 and this error at: heroku logs:

2012-08-13T17:09:29+00:00 heroku[router]: Error H14 (No web processes running) -> GET shrouded-basin-6069.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
@fzaninotto
Owner

I don't know Heroku, and I have no idea whath this error means. You should investigate more together with Heroku to check what the problem is.

@joshuairl

Just for future visitors of this issue...
Heroku apps run under what Heroku calls "Web Dynos", essentially it's a single running process... in your case it would be your "node app.js" of this particular application.

No web processes running means that your node app.js or node process respectively is simply not running...
Whether that be due to the fact that you didn't create a Procfile to tell Heroku what to run... or there is a fatal error in the initial running of the node app.

If you do not have a Procfile in the root of your Uptime app... you should add one that looks like this:

web: node app.js

Add & Commit this change, then do another git push heroku master and wait to see if it deployed.

Once it deploys, try your herokuapp.com url again and if it still errors out... then that means it's failing.

You can run the heroku logs command in your terminal to assist in debugging the problem.

I suspect it's one of the following problems...
1.) The port you're trying to use is 8082 and Heroku is only accepting what is stored in process.env.PORT
To fix this, in app.js... line 110 simply change
server.listen(process.env.PORT || config.server.port || 8082);
(HONESTLY, this is best practice anyway and should probably be merged into Uptime)
This will ensure that process.env.PORT takes precedence. There are a few things with Uptime to consider when changing the port from 8082... and those are probably going to be dependent on what you have your API URL set to in the config.yaml files... I suggest making a production.yaml that reflects the production settings for Heroku...
For instance... part of my production.yaml looks like this:

monitor:
  name:                   origin
  apiUrl:                 'http://appname.herokuapp.com/api' # must be accessible without a proxy
  pollingInterval:        10000      # ten seconds

2.) Your MongoDB connection settings could be invalid...
In this case, do heroku logs and ensure you don't have any fatal errors relating to Mongo...
Or if you find any fatal errors relating to anything else... feel free to post them back here and I'll assist further.

@fzaninotto
Owner

calling the node app command prefixed with a custom PORT environment variable is now supported.

@gabrielstuff

no problem on heroku and appfog. Works nicely.

@fzaninotto fzaninotto closed this Mar 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.