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

Heroku Deploy from Mint #5805

Closed
milesflo opened this issue Jul 6, 2017 · 9 comments
Closed

Heroku Deploy from Mint #5805

milesflo opened this issue Jul 6, 2017 · 9 comments

Comments

@milesflo
Copy link

milesflo commented Jul 6, 2017

When commiting and deploying post-setup files from a distro to Heroku, the server attempts to access some nonexistent files. This produces an Internal Server Error when attempting to access the [site]

heroku log yields the following:

2017-07-04T19:56:50.625721+00:00 heroku[web.1]: Idling
2017-07-04T19:56:50.626305+00:00 heroku[web.1]: State changed from up to down
2017-07-04T19:56:51.392709+00:00 app[web.1]: fs.js:1066
2017-07-04T19:56:51.392722+00:00 app[web.1]:   return binding.unlink(pathModule._makeLong(path));
2017-07-04T19:56:51.392723+00:00 app[web.1]:                  ^
2017-07-04T19:56:51.392724+00:00 app[web.1]: 
2017-07-04T19:56:51.392724+00:00 app[web.1]: Error: ENOENT: no such file or directory, unlink '/app/pidfile'
2017-07-04T19:56:51.392726+00:00 app[web.1]:     at process.Loader.stop (/app/loader.js:187:5)
2017-07-04T19:56:51.392725+00:00 app[web.1]:     at Object.fs.unlinkSync (fs.js:1066:18)
2017-07-04T19:56:51.392726+00:00 app[web.1]:     at emitNone (events.js:105:13)
2017-07-04T19:56:51.392727+00:00 app[web.1]:     at process.emit (events.js:207:7)
2017-07-04T19:56:51.392727+00:00 app[web.1]:     at Signal.wrap.onsignal (internal/process.js:207:44)
2017-07-04T19:56:51.380740+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-07-04T19:56:51.535261+00:00 heroku[web.1]: Process exited with status 1
2017-07-06T01:23:47.600263+00:00 heroku[web.1]: Unidling
2017-07-06T01:23:47.600535+00:00 heroku[web.1]: State changed from down to starting
2017-07-06T01:23:52.590883+00:00 heroku[web.1]: Starting process with command `node loader.js --no-daemon`
2017-07-06T01:23:59.954793+00:00 heroku[web.1]: State changed from starting to up
2017-07-06T01:24:01.861140+00:00 heroku[router]: at=info method=GET path="/" host=sol-forum.herokuapp.com request_id=49f98752-3506-4b0e-91c8-9aa36626a5fe fwd="24.5.25.83" dyno=web.1 connect=1ms service=205ms status=500 bytes=455 protocol=http
2017-07-06T01:24:02.329541+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=sol-forum.herokuapp.com request_id=4274d4d2-c81b-4871-8a0e-aefbf250ae97 fwd="24.5.25.83" dyno=web.1 connect=1ms service=19ms status=200 bytes=690 protocol=http
  • NodeBB version: Latest
  • NodeBB git hash:
  • Database type: redis
  • Database version: Latest
@julianlam
Copy link
Member

Does it work if you change the Procfile? to node app.js?

@milesflo
Copy link
Author

milesflo commented Jul 6, 2017

@julianlam Lightning fast response. Will try that now.

@milesflo
Copy link
Author

milesflo commented Jul 6, 2017

@julianlam
Post Procfile edit logs:

2017-07-06T01:40:03.810104+00:00 heroku[web.1]: Restarting
2017-07-06T01:40:03.810905+00:00 heroku[web.1]: State changed from up to starting
2017-07-06T01:40:04.509800+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2017-07-06T01:40:04.667729+00:00 heroku[web.1]: Process exited with status 1
2017-07-06T01:40:04.529997+00:00 app[web.1]: fs.js:1066
2017-07-06T01:40:04.530010+00:00 app[web.1]:   return binding.unlink(pathModule._makeLong(path));
2017-07-06T01:40:04.530011+00:00 app[web.1]:                  ^
2017-07-06T01:40:04.530011+00:00 app[web.1]: 
2017-07-06T01:40:04.530012+00:00 app[web.1]: Error: ENOENT: no such file or directory, unlink '/app/pidfile'
2017-07-06T01:40:04.530013+00:00 app[web.1]:     at Object.fs.unlinkSync (fs.js:1066:18)
2017-07-06T01:40:04.530014+00:00 app[web.1]:     at emitNone (events.js:105:13)
2017-07-06T01:40:04.530015+00:00 app[web.1]:     at process.emit (events.js:207:7)
2017-07-06T01:40:04.530014+00:00 app[web.1]:     at process.Loader.stop (/app/loader.js:187:5)
2017-07-06T01:40:04.530015+00:00 app[web.1]:     at Signal.wrap.onsignal (internal/process.js:207:44)
2017-07-06T01:40:07.818590+00:00 heroku[web.1]: Starting process with command `npm start`
2017-07-06T01:40:10.062156+00:00 app[web.1]: 
2017-07-06T01:40:10.062171+00:00 app[web.1]: > nodebb@1.5.1 start /app
2017-07-06T01:40:10.062172+00:00 app[web.1]: > node loader.js
2017-07-06T01:40:10.062173+00:00 app[web.1]: 
2017-07-06T01:40:10.523283+00:00 app[web.1]:     throw new TypeError('"cwd" must be a string');
2017-07-06T01:40:10.523284+00:00 app[web.1]:     ^
2017-07-06T01:40:10.523270+00:00 app[web.1]: child_process.js:400
2017-07-06T01:40:10.523286+00:00 app[web.1]:     at normalizeSpawnArguments (child_process.js:400:11)
2017-07-06T01:40:10.523285+00:00 app[web.1]: 
2017-07-06T01:40:10.523285+00:00 app[web.1]: TypeError: "cwd" must be a string
2017-07-06T01:40:10.523287+00:00 app[web.1]:     at Object.exports.spawn (child_process.js:485:38)
2017-07-06T01:40:10.523288+00:00 app[web.1]:     at Function.module.exports.daemon (/app/node_modules/daemon/index.js:50:31)
2017-07-06T01:40:10.523288+00:00 app[web.1]:     at module.exports (/app/node_modules/daemon/index.js:25:20)
2017-07-06T01:40:10.523289+00:00 app[web.1]:     at FSReqWrap.oncomplete (fs.js:135:15)
2017-07-06T01:40:10.523288+00:00 app[web.1]:     at /app/loader.js:223:21
2017-07-06T01:40:10.536647+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-07-06T01:40:10.536845+00:00 app[web.1]: npm ERR! errno 1
2017-07-06T01:40:10.536989+00:00 app[web.1]: npm ERR! nodebb@1.5.1 start: `node loader.js`
2017-07-06T01:40:10.537111+00:00 app[web.1]: npm ERR! Exit status 1
2017-07-06T01:40:10.537244+00:00 app[web.1]: npm ERR! 
2017-07-06T01:40:10.537367+00:00 app[web.1]: npm ERR! Failed at the nodebb@1.5.1 start script.
2017-07-06T01:40:10.537492+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-07-06T01:40:10.538364+00:00 app[web.1]: 
2017-07-06T01:40:10.538525+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-07-06T01:40:10.538631+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-07-06T01_40_10_532Z-debug.log
2017-07-06T01:40:10.614075+00:00 heroku[web.1]: State changed from starting to crashed
2017-07-06T01:40:10.615482+00:00 heroku[web.1]: State changed from crashed to starting
2017-07-06T01:40:10.599773+00:00 heroku[web.1]: Process exited with status 1
2017-07-06T01:40:15.560291+00:00 heroku[web.1]: Starting process with command `npm start`
2017-07-06T01:40:18.572453+00:00 app[web.1]: 
2017-07-06T01:40:18.572466+00:00 app[web.1]: > nodebb@1.5.1 start /app
2017-07-06T01:40:18.572467+00:00 app[web.1]: > node loader.js
2017-07-06T01:40:18.572468+00:00 app[web.1]: 
2017-07-06T01:40:19.528511+00:00 app[web.1]: child_process.js:400
2017-07-06T01:40:19.528522+00:00 app[web.1]:     throw new TypeError('"cwd" must be a string');
2017-07-06T01:40:19.528523+00:00 app[web.1]:     ^
2017-07-06T01:40:19.528524+00:00 app[web.1]: 
2017-07-06T01:40:19.528525+00:00 app[web.1]: TypeError: "cwd" must be a string
2017-07-06T01:40:19.528525+00:00 app[web.1]:     at normalizeSpawnArguments (child_process.js:400:11)
2017-07-06T01:40:19.528526+00:00 app[web.1]:     at Object.exports.spawn (child_process.js:485:38)
2017-07-06T01:40:19.528527+00:00 app[web.1]:     at Function.module.exports.daemon (/app/node_modules/daemon/index.js:50:31)
2017-07-06T01:40:19.528528+00:00 app[web.1]:     at module.exports (/app/node_modules/daemon/index.js:25:20)
2017-07-06T01:40:19.528528+00:00 app[web.1]:     at /app/loader.js:223:21
2017-07-06T01:40:19.528529+00:00 app[web.1]:     at FSReqWrap.oncomplete (fs.js:135:15)
2017-07-06T01:40:20.087453+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-07-06T01:40:20.087780+00:00 app[web.1]: npm ERR! errno 1
2017-07-06T01:40:20.087997+00:00 app[web.1]: npm ERR! nodebb@1.5.1 start: `node loader.js`
2017-07-06T01:40:20.088171+00:00 app[web.1]: npm ERR! Exit status 1
2017-07-06T01:40:20.088357+00:00 app[web.1]: npm ERR! 
2017-07-06T01:40:20.088526+00:00 app[web.1]: npm ERR! Failed at the nodebb@1.5.1 start script.
2017-07-06T01:40:20.088679+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-07-06T01:40:20.090048+00:00 app[web.1]: 
2017-07-06T01:40:20.090296+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-07-06T01:40:20.090468+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2017-07-06T01_40_19_541Z-debug.log
2017-07-06T01:40:20.209877+00:00 heroku[web.1]: Process exited with status 1
2017-07-06T01:40:20.231252+00:00 heroku[web.1]: State changed from starting to crashed
2017-07-06T01:40:21.790066+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sol-forum.herokuapp.com request_id=2e984a90-3c91-49b6-813a-1cb7b6920931 fwd="24.5.25.83" dyno= connect= service= status=503 bytes= protocol=http
2017-07-06T01:40:27.670942+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sol-forum.herokuapp.com request_id=73ca913a-b955-4c15-a026-27faa2acffd0 fwd="24.5.25.83" dyno= connect= service= status=503 bytes= protocol=http

@pitaj
Copy link
Contributor

pitaj commented Jul 6, 2017

Are you on Node v8?

@milesflo
Copy link
Author

milesflo commented Jul 6, 2017

@pitaj Node Version v6.11.0

@pitaj
Copy link
Contributor

pitaj commented Jul 6, 2017

Have you tried using node app? I don't see it anywhere in those logs.

@milesflo
Copy link
Author

milesflo commented Jul 6, 2017

Ahh. Looking at the logs now, it was doing default behavior npm start and ignoring the Procfile because it was malformed. I have fixed it to say web: node app -p $PORT and it starts fine, but has issue binding to the port. Logs follow.

2017-07-06T19:00:50.276747+00:00 heroku[web.1]: State changed from crashed to starting
2017-07-06T19:00:55.217600+00:00 heroku[web.1]: Starting process with command `node app -p`
2017-07-06T19:00:57.934589+00:00 app[web.1]: 6/7 19:00:57 [4] - info: NodeBB v1.5.1 Copyright (C) 2013-2017 NodeBB Inc.
2017-07-06T19:00:57.936845+00:00 app[web.1]: 6/7 19:00:57 [4] - info: This program comes with ABSOLUTELY NO WARRANTY.
2017-07-06T19:00:57.937130+00:00 app[web.1]: 6/7 19:00:57 [4] - info: This is free software, and you are welcome to redistribute it under certain conditions.
2017-07-06T19:00:57.937378+00:00 app[web.1]: 6/7 19:00:57 [4] - info:  
2017-07-06T19:00:58.056054+00:00 app[web.1]: 6/7 19:00:58 [4] - info: Initializing NodeBB v1.5.1
2017-07-06T19:00:59.170825+00:00 app[web.1]: [deprecated] `String.prototype.rtrim` is deprecated as of NodeBB v1.5; use `utils.rtrim` instead.
2017-07-06T19:01:00.161162+00:00 app[web.1]: 6/7 19:01:00 [4] - info: [socket.io] Restricting access to origin: http://sol-forum.herokuapp.com:*

2017-07-06T19:01:00.886270+00:00 app[web.1]: 6/7 19:01:00 [4] - info: Routes added
2017-07-06T19:01:01.131209+00:00 app[web.1]: 6/7 19:01:01 [4] - info: NodeBB Ready
2017-07-06T19:01:01.138343+00:00 app[web.1]: 6/7 19:01:01 [4] - info: Enabling 'trust proxy'
2017-07-06T19:01:01.148279+00:00 app[web.1]: 6/7 19:01:01 [4] - info: NodeBB is now listening on: 0.0.0.0:4567
2017-07-06T19:01:55.532449+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2017-07-06T19:01:55.532518+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-07-06T19:01:55.635887+00:00 heroku[web.1]: Process exited with status 137
2017-07-06T19:01:55.651092+00:00 heroku[web.1]: State changed from starting to crashed

Search queries have yielded that the -p $PORT args would help, but this has not been the case. If someone with authority on the project would like, I can share my config file over a more secure line to see if the issue lies there.

@julianlam
Copy link
Member

Try latest master, I believe we fixed that port issue recently...

@milesflo
Copy link
Author

milesflo commented Jul 6, 2017

Fixed the problem by editing the Procfile to web: ./nodebb setup && ./nodebb start

EDIT: Also figured out the password issue. It was baca____, which hits the nail on the head!

@milesflo milesflo closed this as completed Jul 6, 2017
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

3 participants