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

NodeBB not working on heroku but works on local machine #2544

Closed
shivaramanaiyer opened this issue Dec 22, 2014 · 32 comments
Closed

NodeBB not working on heroku but works on local machine #2544

shivaramanaiyer opened this issue Dec 22, 2014 · 32 comments
Labels

Comments

@shivaramanaiyer
Copy link

Hi,
I've been trying to follow the process of installing NodeBB on Heroku, and I have been able to successfully run it in my local machine(Ubuntu 14.04). But, it seems like on the heroku server I am getting errors... Following is my output of "heroku logs"

2014-12-22T14:28:38.968514+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-22T14:29:39.355080+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-22T14:29:39.355331+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-22T14:29:40.152569+00:00 heroku[web.1]: Process exited with status 137
2014-12-22T14:29:40.168501+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-22T14:29:40.169139+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-22T14:29:42.978814+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-22T14:30:43.197962+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-22T14:30:43.198156+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-22T14:30:43.949869+00:00 heroku[web.1]: Process exited with status 137
2014-12-22T14:30:43.964372+00:00 heroku[web.1]: State changed from starting to crashed

Could you please help me with the problem.

Thank you

@wladpaiva
Copy link

It's happening the same thing here.
I installed v0.5.7 initially and it was working fine but when I upgraded to v0.6.0 stopped working.
I noticed that the last version havent a bind_address in config file.
The same problem happened to me when I changed this property in v0.5.7.

@barisusakli
Copy link
Member

Post the config file that is not working.

@wladpaiva
Copy link

nevermind...
I changed the Procfile to:
web: node app.js

And it's working fine now. 👍

@wladpaiva
Copy link

as a suggestion update the tutorial

@julianlam
Copy link
Member

@wladiston Running NodeBB directly (via app.js) means certain features like restarting are unable to function.

If v0.6.0 is broken on Heroku because of a configuration change since v0.5.7, we'll have to look into the reason for it.

@barisusakli It may be related to Heroku sending in the port via PORT env var, instead of relying on a value in config.json

@barisusakli
Copy link
Member

Adding nconf.argv().env(); to loader.js might fix it then.

@shivaramanaiyer
Copy link
Author

I am still using v0.5.7 and not v0.6.0
I setup the app again from scratch using the heroku tutorial but with a mongodb instance instead of a redis one. I am using Mongolab for my database and configured it to run. I am able to run all of it from my local machine, yet again. But, I get the following console log in case if the server:

014-12-29T12:16:13.566237+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T12:16:13.556120+00:00 heroku[web.1]: Process exited with status 0
2014-12-29T12:16:16.915228+00:00 heroku[web.1]: Starting process with command node app.js
2014-12-29T12:16:17.787503+00:00 app[web.1]: 2014-12-29T12:16:17.787Z - info: Initializing NodeBB v0.5.7
2014-12-29T12:16:17.787596+00:00 app[web.1]: 2014-12-29T12:16:17.787Z - info: * using configuration stored in: /app/config.json
2014-12-29T12:16:17.845853+00:00 app[web.1]: 2014-12-29T12:16:17.845Z - error: Unable to initialize MongoDB! Is MongoDB installed? Error :Cannot find module 'mongodb'
2014-12-29T12:16:17.781703+00:00 app[web.1]: 2014-12-29T12:16:17.781Z - info:
2014-12-29T12:16:17.780560+00:00 app[web.1]: 2014-12-29T12:16:17.777Z - info: NodeBB v0.5.7 Copyright (C) 2013-2014 NodeBB Inc.
2014-12-29T12:16:17.781620+00:00 app[web.1]: 2014-12-29T12:16:17.781Z - info: This is free software, and you are welcome to redistribute it under certain conditions.
2014-12-29T12:16:17.787433+00:00 app[web.1]: 2014-12-29T12:16:17.787Z - info: Time: Mon Dec 29 2014 12:16:17 GMT+0000 (UTC)
2014-12-29T12:16:17.781467+00:00 app[web.1]: 2014-12-29T12:16:17.781Z - info: This program comes with ABSOLUTELY NO WARRANTY.
2014-12-29T12:16:18.556168+00:00 heroku[web.1]: Process exited with status 0
2014-12-29T12:16:18.569932+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T12:17:41.328825+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=nodebb-seekbigger.herokuapp.com request_id=a8a82f67-7fbc-476b-9fec-31876aff0bc4 fwd="82.132.236.222" dyno= connect= service= status=503 bytes=
2014-12-29T12:17:44.207634+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=nodebb-seekbigger.herokuapp.com request_id=a8f3ac42-45c9-4588-91e8-b855e95dc974 fwd="82.132.236.222" dyno= connect= service= status=503 bytes=

I even added mongoose as a dependency but still get the error on the server where as my local machine seems to be working fine. Any clue on this?

@barisusakli
Copy link
Member

Try adding mongodb and connect-mongo to package.json and running npm install?
Those two are installed during ./nodebb setup.

@shivaramanaiyer
Copy link
Author

I did try that and well that error was gone thank you @barisusakli.

But now I am getting the error from earlier again:

2014-12-30T13:51:46.690150+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T13:52:47.297511+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:52:47.297768+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T13:52:48.048900+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T13:52:48.064109+00:00 heroku[web.1]: State changed from starting to crashed

don't what is going wrong...I've been trying to make this run for 5 days now and haven't been able to do it even after following the tutorial properly

@julianlam
Copy link
Member

Please show us the output of the heroku log
On 30 Dec 2014 13:38, "Shivaraman Iyer" notifications@github.com wrote:

I did try that and well that error was gone thank you @barisusakli
https://github.com/barisusakli.

But now I am getting the error from earlier again:

2014-12-30T13:51:46.690150+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T13:52:47.297511+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:52:47.297768+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T13:52:48.048900+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T13:52:48.064109+00:00 heroku[web.1]: State changed from
starting to crashed

don't what is going wrong...I've been trying to make this run for 5 days
now and haven't been able to do it even after following the tutorial
properly


Reply to this email directly or view it on GitHub
#2544 (comment).

@shivaramanaiyer
Copy link
Author

That's the output of heroku logs
2014-12-29T19:52:05.090189+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T19:52:05.897613+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T19:52:05.926695+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T19:52:05.927581+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T19:52:09.377712+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T19:52:39.921889+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=community.seekbigger.co.uk request_id=57dc1c8f-98c3-4de1-a5b4-0916a12b10d2 fwd="195.171.121.93" dyno= connect= service= status=503 bytes=
2014-12-29T19:53:10.010197+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T19:53:10.010488+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T19:53:10.877490+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T19:53:10.885892+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T19:53:12.712400+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=community.seekbigger.co.uk request_id=be5fb16e-4ec5-428e-96a1-bacf0674602d fwd="195.171.121.93" dyno= connect= service= status=503 bytes=
2014-12-29T19:53:47.972522+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=community.seekbigger.co.uk request_id=e6d0e1cf-c605-45fc-a1cf-3f7c393c4f20 fwd="10.144.66.72,82.132.230.233" dyno= connect= service= status=503 bytes=
2014-12-29T19:54:44.277659+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=community.seekbigger.co.uk request_id=9a175646-18df-4132-bff5-1289b394e537 fwd="10.144.66.72,82.132.230.233" dyno= connect= service= status=503 bytes=
2014-12-29T20:16:37.807388+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T20:16:41.135098+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T20:17:41.536433+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T20:17:41.536433+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T20:17:42.473169+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T20:17:42.463381+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T20:22:52.363261+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T20:22:55.854033+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T20:22:58.062167+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T20:23:26.032683+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-12-29T20:23:27.674211+00:00 heroku[web.1]: Process exited with status 143
2014-12-29T20:23:58.576097+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T20:23:58.576097+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T20:23:59.527968+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T20:23:59.515875+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T20:30:10.219524+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T20:30:13.946141+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T20:31:14.434381+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T20:31:14.434810+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T20:31:15.269161+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T20:31:15.283984+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T21:00:29.912736+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T21:00:33.536843+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T21:01:33.897134+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T21:01:33.897385+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T21:01:34.707631+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T21:01:34.721094+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T22:17:47.449602+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T22:17:50.768447+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T22:18:51.191195+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T22:18:51.191195+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T22:18:52.220474+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-29T22:18:52.183931+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T23:45:34.778794+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-29T23:45:39.192982+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-29T23:46:39.344160+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-29T23:46:39.343909+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T23:46:40.171707+00:00 heroku[web.1]: Process exited with status 137
2014-12-29T23:46:40.225294+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-30T02:37:05.274010+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-30T02:37:10.040012+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T02:38:10.070442+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T02:38:10.070797+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T02:38:10.932303+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T02:38:10.938671+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-30T13:48:06.643810+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-30T13:48:10.078950+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T13:48:13.534496+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T13:49:05.199010+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-12-30T13:49:06.972746+00:00 heroku[web.1]: Process exited with status 143
2014-12-30T13:49:13.920701+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T13:49:13.920466+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:49:14.806934+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T13:49:14.820616+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-30T13:49:14.820616+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-30T13:49:19.056934+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T13:50:19.424280+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:50:19.424753+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T13:50:20.246928+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T13:50:20.259402+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-30T13:51:43.538674+00:00 heroku[api]: Deploy 65277c5 by sra392@gmail.com
2014-12-30T13:51:43.538758+00:00 heroku[api]: Release v10 created by sra392@gmail.com
2014-12-30T13:51:43.806709+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-30T13:51:46.690150+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T13:52:47.297511+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:52:47.297768+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T13:52:48.048900+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T13:52:48.064109+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-30T13:54:05.473654+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=community.seekbigger.co.uk request_id=783b7a86-f797-41ca-8827-dbc0196a5e43 fwd="195.171.121.93" dyno= connect= service= status=503 bytes=
2014-12-30T13:54:06.322683+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=community.seekbigger.co.uk request_id=a0d6751a-4d15-47df-b329-3caca37ba218 fwd="195.171.121.93" dyno= connect= service= status=503 bytes=
2014-12-30T14:10:21.354437+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-30T14:10:24.487408+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T14:11:24.940861+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T14:11:24.941081+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T14:11:25.749992+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T14:11:25.754677+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-30T14:54:22.709118+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-30T14:54:26.107221+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T14:55:26.396221+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T14:55:26.396221+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T14:55:27.184609+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T14:55:27.198718+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-30T16:13:02.665974+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-30T16:13:08.451411+00:00 heroku[web.1]: Starting process with command node loader.js --no-daemon
2014-12-30T16:14:08.735604+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T16:14:08.735917+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-12-30T16:14:09.777880+00:00 heroku[web.1]: Process exited with status 137
2014-12-30T16:14:09.788972+00:00 heroku[web.1]: State changed from starting to crashed

@julianlam
Copy link
Member

No, this is the execution log from heroku. I need the log from NodeBB
itself.

Heroku details how to get this log, I don't remember at the moment.
On 30 Dec 2014 14:39, "Shivaraman Iyer" notifications@github.com wrote:

That's the output of heroku logs
2014-12-29T19:52:05.090189+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T19:52:05.897613+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T19:52:05.926695+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-29T19:52:05.927581+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-29T19:52:09.377712+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T19:52:39.921889+00:00 heroku[router]: at=error code=H20
desc="App boot timeout" method=GET path="/" host=
community.seekbigger.co.uk
request_id=57dc1c8f-98c3-4de1-a5b4-0916a12b10d2 fwd="195.171.121.93" dyno=
connect= service= status=503 bytes=
2014-12-29T19:53:10.010197+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T19:53:10.010488+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T19:53:10.877490+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T19:53:10.885892+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-29T19:53:12.712400+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=community.seekbigger.co.uk
request_id=be5fb16e-4ec5-428e-96a1-bacf0674602d fwd="195.171.121.93" dyno=
connect= service= status=503 bytes=
2014-12-29T19:53:47.972522+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=community.seekbigger.co.uk
request_id=e6d0e1cf-c605-45fc-a1cf-3f7c393c4f20
fwd="10.144.66.72,82.132.230.233" dyno= connect= service= status=503 bytes=
2014-12-29T19:54:44.277659+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico" host=
community.seekbigger.co.uk
request_id=9a175646-18df-4132-bff5-1289b394e537
fwd="10.144.66.72,82.132.230.233" dyno= connect= service= status=503 bytes=
2014-12-29T20:16:37.807388+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-29T20:16:41.135098+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T20:17:41.536433+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T20:17:41.536433+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T20:17:42.473169+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-29T20:17:42.463381+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T20:22:52.363261+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-29T20:22:55.854033+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T20:22:58.062167+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T20:23:26.032683+00:00 heroku[web.1]: Stopping all processes
with SIGTERM
2014-12-29T20:23:27.674211+00:00 heroku[web.1]: Process exited with status
143
2014-12-29T20:23:58.576097+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T20:23:58.576097+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T20:23:59.527968+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-29T20:23:59.515875+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T20:30:10.219524+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-29T20:30:13.946141+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T20:31:14.434381+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T20:31:14.434810+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T20:31:15.269161+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T20:31:15.283984+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-29T21:00:29.912736+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-29T21:00:33.536843+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T21:01:33.897134+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T21:01:33.897385+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T21:01:34.707631+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T21:01:34.721094+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-29T22:17:47.449602+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-29T22:17:50.768447+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T22:18:51.191195+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T22:18:51.191195+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T22:18:52.220474+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-29T22:18:52.183931+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T23:45:34.778794+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-29T23:45:39.192982+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-29T23:46:39.344160+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-29T23:46:39.343909+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-29T23:46:40.171707+00:00 heroku[web.1]: Process exited with status
137
2014-12-29T23:46:40.225294+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-30T02:37:05.274010+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-30T02:37:10.040012+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T02:38:10.070442+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T02:38:10.070797+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T02:38:10.932303+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T02:38:10.938671+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-30T13:48:06.643810+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-30T13:48:10.078950+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T13:48:13.534496+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T13:49:05.199010+00:00 heroku[web.1]: Stopping all processes
with SIGTERM
2014-12-30T13:49:06.972746+00:00 heroku[web.1]: Process exited with status
143
2014-12-30T13:49:13.920701+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T13:49:13.920466+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:49:14.806934+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T13:49:14.820616+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-30T13:49:14.820616+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-30T13:49:19.056934+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T13:50:19.424280+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:50:19.424753+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T13:50:20.246928+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T13:50:20.259402+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-30T13:51:43.538674+00:00 heroku[api]: Deploy 65277c5 by
sra392@gmail.com
2014-12-30T13:51:43.538758+00:00 heroku[api]: Release v10 created by
sra392@gmail.com
2014-12-30T13:51:43.806709+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-30T13:51:46.690150+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T13:52:47.297511+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T13:52:47.297768+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T13:52:48.048900+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T13:52:48.064109+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-30T13:54:05.473654+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/" host=community.seekbigger.co.uk
request_id=783b7a86-f797-41ca-8827-dbc0196a5e43 fwd="195.171.121.93" dyno=
connect= service= status=503 bytes=
2014-12-30T13:54:06.322683+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico" host=
community.seekbigger.co.uk
request_id=a0d6751a-4d15-47df-b329-3caca37ba218 fwd="195.171.121.93" dyno=
connect= service= status=503 bytes=
2014-12-30T14:10:21.354437+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-30T14:10:24.487408+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T14:11:24.940861+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T14:11:24.941081+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T14:11:25.749992+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T14:11:25.754677+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-30T14:54:22.709118+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-30T14:54:26.107221+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T14:55:26.396221+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T14:55:26.396221+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T14:55:27.184609+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T14:55:27.198718+00:00 heroku[web.1]: State changed from
starting to crashed
2014-12-30T16:13:02.665974+00:00 heroku[web.1]: State changed from crashed
to starting
2014-12-30T16:13:08.451411+00:00 heroku[web.1]: Starting process with
command node loader.js --no-daemon
2014-12-30T16:14:08.735604+00:00 heroku[web.1]: Error R10 (Boot timeout)
-> Web process failed to bind to $PORT within 60 seconds of launch
2014-12-30T16:14:08.735917+00:00 heroku[web.1]: Stopping process with
SIGKILL
2014-12-30T16:14:09.777880+00:00 heroku[web.1]: Process exited with status
137
2014-12-30T16:14:09.788972+00:00 heroku[web.1]: State changed from
starting to crashed


Reply to this email directly or view it on GitHub
#2544 (comment).

@shivaramanaiyer
Copy link
Author

Sorry about that I guess this is the one that you are asking.

2014-12-30T20:32:39.774515+00:00 app[web.1]: 2014-12-30T20:32:39.770Z - info: NodeBB v0.5.7 Copyright (C) 2013-2014 NodeBB Inc.
2014-12-30T20:32:39.781940+00:00 app[web.1]: 2014-12-30T20:32:39.781Z - info: Time: Tue Dec 30 2014 20:32:39 GMT+0000 (UTC)
2014-12-30T20:32:39.782018+00:00 app[web.1]: 2014-12-30T20:32:39.781Z - info: Initializing NodeBB v0.5.7
2014-12-30T20:32:39.775945+00:00 app[web.1]: 2014-12-30T20:32:39.775Z - info:
2014-12-30T20:32:39.775840+00:00 app[web.1]: 2014-12-30T20:32:39.775Z - info: This is free software, and you are welcome to redistribute it under certain conditions.
2014-12-30T20:32:39.782101+00:00 app[web.1]: 2014-12-30T20:32:39.782Z - info: * using configuration stored in: /app/config.json
2014-12-30T20:32:39.775554+00:00 app[web.1]: 2014-12-30T20:32:39.775Z - info: This program comes with ABSOLUTELY NO WARRANTY.
2014-12-30T20:32:41.150508+00:00 app[web.1]: 2014-12-30T20:32:41.150Z - info: Enabling 'trust proxy'
2014-12-30T20:32:41.405596+00:00 app[web.1]: 2014-12-30T20:32:41.405Z - warn: [plugins/nodebb-plugin-mentions] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.
2014-12-30T20:32:41.527804+00:00 app[web.1]: 2014-12-30T20:32:41.527Z - info: [meta/css] Minifying LESS/CSS
2014-12-30T20:32:41.405776+00:00 app[web.1]:
2014-12-30T20:32:41.375666+00:00 app[web.1]:
2014-12-30T20:32:41.402780+00:00 app[web.1]:
2014-12-30T20:32:41.406658+00:00 app[web.1]:
2014-12-30T20:32:41.406426+00:00 app[web.1]:
2014-12-30T20:32:41.492290+00:00 app[web.1]: 2014-12-30T20:32:41.492Z - info: [plugins] All plugins reloaded and rerouted
2014-12-30T20:32:41.406624+00:00 app[web.1]: 2014-12-30T20:32:41.406Z - warn: [plugins/nodebb-widget-essentials] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-widget-essentials".
2014-12-30T20:32:41.406529+00:00 app[web.1]: 2014-12-30T20:32:41.406Z - warn: [plugins/nodebb-widget-essentials] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.
2014-12-30T20:32:41.402463+00:00 app[web.1]: 2014-12-30T20:32:41.402Z - warn: [plugins/nodebb-plugin-markdown] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing.
2014-12-30T20:32:41.492194+00:00 app[web.1]: 2014-12-30T20:32:41.492Z - info: [hotswap] Router with id plugins replaced successfully
2014-12-30T20:32:41.534360+00:00 app[web.1]: 2014-12-30T20:32:41.534Z - info: [hotswap] Router with id auth replaced successfully
2014-12-30T20:32:41.405730+00:00 app[web.1]: 2014-12-30T20:32:41.405Z - warn: [plugins/nodebb-plugin-mentions] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-mentions".
2014-12-30T20:32:41.405467+00:00 app[web.1]:
2014-12-30T20:32:41.640372+00:00 app[web.1]: at asyncCallback (dns.js:68:16)
2014-12-30T20:32:41.640371+00:00 app[web.1]: at net.js:1147:9
2014-12-30T20:32:41.529506+00:00 app[web.1]: 2014-12-30T20:32:41.529Z - info: NodeBB attempting to listen on: seekbigger.co.uk:55676
2014-12-30T20:32:41.640382+00:00 app[web.1]: at errnoException (net.js:905:11)
2014-12-30T20:32:41.640390+00:00 app[web.1]: 2014-12-30T20:32:41.636Z - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
2014-12-30T20:32:41.640484+00:00 app[web.1]: at process._fatalException (node.js:295:26)
2014-12-30T20:32:41.402701+00:00 app[web.1]: 2014-12-30T20:32:41.402Z - warn: [plugins/nodebb-plugin-markdown] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-markdown".
2014-12-30T20:32:41.563708+00:00 app[web.1]: 2014-12-30T20:32:41.563Z - info: [meta/templates] Compiling templates
2014-12-30T20:32:41.640405+00:00 app[web.1]: net.js:1237
2014-12-30T20:32:41.640374+00:00 app[web.1]: at Object.onanswer as oncomplete
2014-12-30T20:32:41.640386+00:00 app[web.1]: at net.js:1147:9
2014-12-30T20:32:41.640381+00:00 app[web.1]: Error: listen EADDRNOTAVAIL
2014-12-30T20:32:41.640387+00:00 app[web.1]: at asyncCallback (dns.js:68:16)
2014-12-30T20:32:41.640369+00:00 app[web.1]: at listen (net.js:1065:10)
2014-12-30T20:32:41.640388+00:00 app[web.1]: at Object.onanswer as oncomplete
2014-12-30T20:32:41.640404+00:00 app[web.1]:
2014-12-30T20:32:41.640482+00:00 app[web.1]: at process.emit (events.js:95:17)
2014-12-30T20:32:41.640476+00:00 app[web.1]: Error: Not running
2014-12-30T20:32:41.640481+00:00 app[web.1]: at process. (/app/app.js:181:7)
2014-12-30T20:32:41.640385+00:00 app[web.1]: at listen (net.js:1065:10)
2014-12-30T20:32:41.640479+00:00 app[web.1]: at shutdown (/app/app.js:344:36)
2014-12-30T20:32:41.640363+00:00 app[web.1]: 2014-12-30T20:32:41.633Z - error: Error: listen EADDRNOTAVAIL
2014-12-30T20:32:41.640383+00:00 app[web.1]: at Server._listen2 (net.js:1024:19)
2014-12-30T20:32:41.640402+00:00 app[web.1]: 2014-12-30T20:32:41.638Z - info: [app] Database connection closed.
2014-12-30T20:32:41.640408+00:00 app[web.1]: ^
2014-12-30T20:32:41.640366+00:00 app[web.1]: at errnoException (net.js:905:11)
2014-12-30T20:32:41.640368+00:00 app[web.1]: at Server._listen2 (net.js:1024:19)
2014-12-30T20:32:41.640407+00:00 app[web.1]: throw new Error('Not running');
2014-12-30T20:32:41.640478+00:00 app[web.1]: at Server.close (net.js:1237:11)
2014-12-30T20:32:42.408402+00:00 heroku[web.1]: Process exited with status 7
2014-12-30T20:32:42.420658+00:00 heroku[web.1]: State changed from starting to crashed

@shivaramanaiyer
Copy link
Author

@julianlam Any clue what the problem might be? I need to get this up and running as soon as possible.

Thank you

@shivaramanaiyer
Copy link
Author

Well I tested with openshift, just to see what is happening and it works perfectly without having to think twice.
Is there a specific reason for nodebb to not work on heroku?

@julianlam
Copy link
Member

2014-12-30T20:32:41.529506+00:00 app[web.1]: 2014-12-30T20:32:41.529Z - info: NodeBB attempting to listen on: seekbigger.co.uk:55676

I don't think the URL should be shown here. Please post your config as @barisusakli suggested.

@shivaramanaiyer
Copy link
Author

{
"base_url": "http://community.seekbigger.co.uk",
"port": "4568",
"secret": "c64bc1c0-42f9-4313-948a-8e5a978be0ad",
"bind_address": "seekbigger.co.uk",
"database": "mongo",
"mongo": {
"host": "ds043200.mongolab.com",
"port": "43200",
"username": "database_user",
"password": "*********",
"database": "heroku_app32898684"
},
"bcrypt_rounds": 12,
"upload_path": "/public/uploads",
"use_port": false,
"relative_path": ""
}

@julianlam
Copy link
Member

Remove bind_address from config, it should be 0.0.0.0, or missing altogether for Heroku, as you don't know the network interface IP address...

@shivaramanaiyer
Copy link
Author

@julianlam That works like a charm! thanks a lot. It would be nice if you could add this particular point in the tutorial itself.

Thanks a lot again!

@adriaandotcom
Copy link

I've the same issue as above, but I don't have the bind_address in my config.json

// config.json
{
    "url": "https://[HIDDEN].herokuapp.com",
    "secret": "[HIDDEN]",
    "database": "redis",
    "redis": {
        "host": "[HIDDEN].redistogo.com",
        "port": "[HIDDEN]",
        "password": "[HIDDEN]",
        "database": "0"
    }
}

It works with the Profile set to web: node app.js, but that's not the right way.

Branch v0.6.x, Mac OS

@AXtime
Copy link

AXtime commented Apr 6, 2015

@harianus I had the same issue with v0.6.1 and was able to get this running by making a simple change to the loader.js file. I changed the getPorts routine to first check for heroku's PORT env variable.

line 185 (should be in the getPorts())
changed from

var port = nconf.get('port') || nconf.get('PORT') || urlObject.port || 4567;

to

var port = process.env.PORT || nconf.get('port') || nconf.get('PORT') || urlObject.port || 4567;

buck-0x pushed a commit to buck-0x/Slack-Twitter that referenced this issue Jul 8, 2015
@Lwdthe1
Copy link

Lwdthe1 commented Jun 21, 2017

I fixed it by doing the following:

  • Change ProcFile to read as follows: web: node app.js
  • In webserver.js, change this line listen(): var port = parseInt(nconf.get('port'), 10); to var port = process.env.PORT || parseInt(nconf.get('port'), 10); because heroku controls what port you use through process.env.PORT.
  • In config.js, make your url field to the address of your herokuapp (i.g "https://yourapp.herokuapp.com"

@pitaj
Copy link
Contributor

pitaj commented Jun 21, 2017

Hmmm... yes it looks like nconf.get('PORT') should come before nconf.get('port')

@pitaj pitaj reopened this Jun 21, 2017
@julianlam
Copy link
Member

Heroku doesn't work on loader.js? Right... that explains it, since app.js had the port section moved out to loader.js. Standby...

@julianlam
Copy link
Member

Out of curiosity, what happens when you have the Procfile contents as:

web: node loader.js --no-daemon

?

@stillli
Copy link

stillli commented Jun 26, 2017

Make change according @Lwdthe1 , but still get error like this

Error: Failed to lookup view "categories" in views directory "/app/build/public/templates"
2017-06-26T19:57:03.759116+00:00 app[web.1]:     at EventEmitter.render (/app/node_modules/express/lib/application.js:580:17)
2017-06-26T19:57:03.759117+00:00 app[web.1]:     at ServerResponse.render (/app/node_modules/express/lib/response.js:971:7)
2017-06-26T19:57:03.759118+00:00 app[web.1]:     at content (/app/src/middleware/render.js:70:15)
......

@pitaj
Copy link
Contributor

pitaj commented Jun 26, 2017

run ./nodebb build, and check if build/public/templates/categories.tpl exists

@Lwdthe1
Copy link

Lwdthe1 commented Jun 26, 2017

Yeah, I never ran into the lookup error @stillli is facing, but I ran into another issue before I ran ./nodebb build and it worked.

@Lwdthe1
Copy link

Lwdthe1 commented Jun 26, 2017

@julianlam It just breaks Heroku because it can' find necessary files that loader.js needs because of file path issues.

@riyadhzen
Copy link

riyadhzen commented Jul 10, 2017

@julianlam, I am running nodebb under dokku (which is similar to heroku) and Regarding your request "Out of curiosity, what happens when you have the Procfile contents as:
web: node loader.js --no-daemon". I got the following error Failed to lookup view "categories" in views directory "/usr/src/app/build/public/templates"
Changing Procfile to node app.js fixed the issue

@riyadhzen
Copy link

Interesting web: node app.js Procfile is causing the same error, but node app.js Procfile doesn't cause the error.

I think I might have to move my part to another issue, as this is dealing with dokku not heroku

@rssbands
Copy link

rssbands commented Sep 3, 2019

I fixed it by doing the following:

  • Change ProcFile to read as follows: web: node app.js
  • In webserver.js, change this line listen(): var port = parseInt(nconf.get('port'), 10); to var port = process.env.PORT || parseInt(nconf.get('port'), 10); because heroku controls what port you use through process.env.PORT.
  • In config.js, make your url field to the address of your herokuapp (i.g "https://yourapp.herokuapp.com"

Ji everyone. Now I have this problem.((
2019-09-03T10:08:46.000000+00:00 app[api]: Build succeeded
2019-09-03T10:09:39.200481+00:00 heroku[web.1]: State changed from starting to crashed
2019-09-03T10:09:39.084174+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of
2019-09-03T10:09:39.084174+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-09-03T10:09:39.177829+00:00 heroku[web.1]: Process exited with status 137
2019-09-03T10:09:41.502915+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thawing-plains-91095.
2019-09-03T10:09:42.422796+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=thawing-pl

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

No branches or pull requests