what does error status 413 in node.js, heroku mean? - javascript

I have a node.js app that works fine locally but when i run in at heroku it quits, I status 0 or status 143 does anyone understand what this can mean?
2015-04-14T21:14:41.428508+00:00 heroku[api]: Release v8 created by
josef#actionist.se
2015-04-14T21:14:41.569626+00:00 heroku[web.1]: State changed from up to starting
2015-04-14T21:14:44.101446+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-04-14T21:14:45.789499+00:00 heroku[web.1]: Starting process with command `node index.js`
2015-04-14T21:14:45.675609+00:00 heroku[web.1]: Process exited with status 143
2015-04-14T21:14:47.559184+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-14T21:14:47.559208+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-14T21:14:49.398042+00:00 app[web.1]: Node app is running at localhost:26268
2015-04-14T21:14:49.825551+00:00 heroku[web.1]: State changed from starting to up
2015-04-14T21:16:05.765151+00:00 heroku[api]: Deploy bcb1918 by josef#actionist.se
2015-04-14T21:16:05.765151+00:00 heroku[api]: Release v9 created by josef#actionist.se
2015-04-14T21:16:06.234464+00:00 heroku[web.1]: State changed from up to starting
2015-04-14T21:16:09.804498+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-04-14T21:16:10.788591+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-14T21:16:11.515039+00:00 heroku[web.1]: Process exited with status 143
2015-04-14T21:16:12.732654+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-14T21:16:12.732736+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-14T21:16:13.951425+00:00 app[web.1]:
2015-04-14T21:16:13.951416+00:00 app[web.1]:
2015-04-14T21:16:13.951422+00:00 app[web.1]: > party#0.1.3 start /app
2015-04-14T21:16:13.951424+00:00 app[web.1]: > node app.js
2015-04-14T21:16:15.479452+00:00 heroku[web.1]: Process exited with status 0
2015-04-14T21:16:15.494024+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-14T21:17:13.883207+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/host=actionistcookalong.herokuapp.com request_id=a5f2ce21-21bd-43ac-8434-9eb39282c542 fwd="178.78.232.172" dyno= connect= service= status=503 bytes=
2015-04-14T21:21:01.044982+00:00 heroku[web.1]: State changed from crashed to starting
2015-04-14T21:21:05.040510+00:00 heroku[web.1]: Starting process with command `npm start`
2015-04-14T21:21:06.954809+00:00 app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
2015-04-14T21:21:06.954834+00:00 app[web.1]: Recommending WEB_CONCURRENCY=1
2015-04-14T21:21:07.605924+00:00 app[web.1]:
2015-04-14T21:21:07.605931+00:00 app[web.1]: > party#0.1.3 start /app
2015-04-14T21:21:07.605933+00:00 app[web.1]: > node app.js
2015-04-14T21:21:07.605935+00:00 app[web.1]:
2015-04-14T21:21:08.874268+00:00 heroku[web.1]: State changed from starting to crashed
2015-04-14T21:21:08.868440+00:00 heroku[web.1]: Process exited with status 0

An exit code of 143 means that a kill process was sent and a SIGTERM signal terminated your process. This is usually triggered whenever you execute any restart commands.

Try running the console, it might crash as well... but will give you the reasoning. Usually it will be some small change you hadn't noticed or forgotten about that the Heroku error logs are bad at reporting.
run this
heroku run node
or
heroku restart

Related

Heroku can't run Node.js bot [duplicate]

This question already has answers here:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch when I launch the bot in heroku
(1 answer)
Heroku Discord Bot is offline
(3 answers)
Python Twitter Bot w/ Heroku Error: R10 Boot Timeout
(1 answer)
Closed 3 days ago.
I've this app online for almost 6 months. When did Heroku become paid?
I turned off the app and now turned on again, but with this error message:
2023-02-17T01:41:42.781769+00:00 heroku[web.1]: Starting process with command npm start'
2023-02-17T01:41:44.529390+00:00 app[web.1]:
2023-02-17T01:41:44.529437+00:00 app[web.1]: > laura-bot#1.0.0 start
2023-02-17T01:41:44.529437+00:00 app[web.1]: > node bot.js
2023-02-17T01:41:44.529438+00:00 app[web.1]:
2023-02-17T01:42:43.020648+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2023-02-17T01:42:43.061426+00:00 heroku[web.1]: Stopping process with SIGKILL
2023-02-17T01:42:43.203331+00:00 heroku[web.1]: Process exited with status 137
2023-02-17T01:42:43.244732+00:00 heroku[web.1]: State changed from starting to crashed
2023-02-17T01:42:45.445544+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET
path="/" host=gentle-dawn-81130.herokuapp.com request_id=c52b465e-7f2f-4d90-882a-42ee1d941a75 fwd="177.170.84.112" dyno= connect= service= status=503 bytes= protocol=https

Method Not Allowed heroku deploy

Hello I am deploying for the first time with heroku, and I have a problem.
When doing git push heroku master everything works correctly, but when entering the site through the browser it shows me only the message of Method Not Allowed
About the project: It is made with nodejs, express, postgres and sequelize on the backend side and with react on the front side.
The database is already uploaded and is working correctly! but when uploading the project it doesn't work
when doing heroku logs -n 200 it returns me
› Warning: heroku update available from 7.59.1 to 7.59.2.
2021-12-28T00:46:51.552641+00:00 app[api]: Initial release by user ivanleodomin00#gmail.com
2021-12-28T00:46:51.552641+00:00 app[api]: Release v1 created by user ivanleodomin00#gmail.com
2021-12-28T00:46:55.112224+00:00 app[api]: Release v2 created by user ivanleodomin00#gmail.com
2021-12-28T00:46:55.112224+00:00 app[api]: Enable Logplex by user ivanleodomin00#gmail.com
2021-12-28T00:47:57.250526+00:00 app[api]: Attach DATABASE (#ref:postgresql-amorphous-18095) by user ivanleodomin00#gmail.com
2021-12-28T00:47:57.250526+00:00 app[api]: Running release v3 commands by user ivanleodomin00#gmail.com
2021-12-28T00:47:57.275444+00:00 app[api]: #ref:postgresql-amorphous-18095 completed provisioning, setting DATABASE_URL. by user ivanleodomin00#gmail.com
2021-12-28T00:47:57.275444+00:00 app[api]: Release v4 created by user ivanleodomin00#gmail.com
2021-12-28T01:10:18.000000+00:00 app[api]: Build started by user ivanleodomin00#gmail.com
2021-12-28T01:10:38.372557+00:00 app[api]: Deploy abd73b84 by user ivanleodomin00#gmail.com
2021-12-28T01:10:38.372557+00:00 app[api]: Release v5 created by user ivanleodomin00#gmail.com
2021-12-28T01:10:38.387597+00:00 app[api]: Scaled to web#1:Free by user ivanleodomin00#gmail.com
2021-12-28T01:10:39.000000+00:00 app[api]: Build succeeded
2021-12-28T01:10:41.897243+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-28T01:10:43.543463+00:00 app[web.1]:
2021-12-28T01:10:43.543478+00:00 app[web.1]: > e-commerce#0.1.0 start /app
2021-12-28T01:10:43.543478+00:00 app[web.1]: > per-env
2021-12-28T01:10:43.543478+00:00 app[web.1]:
2021-12-28T01:10:43.561920+00:00 app[web.1]: sh: 1: per-env: not found
2021-12-28T01:10:43.568721+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-12-28T01:10:43.568931+00:00 app[web.1]: npm ERR! syscall spawn
2021-12-28T01:10:43.569020+00:00 app[web.1]: npm ERR! file sh
2021-12-28T01:10:43.569124+00:00 app[web.1]: npm ERR! errno ENOENT
2021-12-28T01:10:43.573632+00:00 app[web.1]: npm ERR! e-commerce#0.1.0 start: `per-env`
2021-12-28T01:10:43.573685+00:00 app[web.1]: npm ERR! spawn ENOENT
2021-12-28T01:10:43.573770+00:00 app[web.1]: npm ERR!
2021-12-28T01:10:43.573839+00:00 app[web.1]: npm ERR! Failed at the e-commerce#0.1.0 start script.
2021-12-28T01:10:43.573890+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-12-28T01:10:43.579537+00:00 app[web.1]:
2021-12-28T01:10:43.579638+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-12-28T01:10:43.579689+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-12-28T01_10_43_574Z-debug.log
2021-12-28T01:10:43.703276+00:00 heroku[web.1]: Process exited with status 1
2021-12-28T01:10:43.758598+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-28T01:10:43.763138+00:00 heroku[web.1]: State changed from crashed to starting
2021-12-28T01:10:46.370206+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-28T01:10:47.472121+00:00 app[web.1]:
2021-12-28T01:10:47.472132+00:00 app[web.1]: > e-commerce#0.1.0 start /app
2021-12-28T01:10:47.472132+00:00 app[web.1]: > per-env
2021-12-28T01:10:47.472132+00:00 app[web.1]:
2021-12-28T01:10:47.476034+00:00 app[web.1]: sh: 1: per-env: not found
2021-12-28T01:10:47.479992+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-12-28T01:10:47.480158+00:00 app[web.1]: npm ERR! syscall spawn
2021-12-28T01:10:47.480221+00:00 app[web.1]: npm ERR! file sh
2021-12-28T01:10:47.480286+00:00 app[web.1]: npm ERR! errno ENOENT
2021-12-28T01:10:47.482318+00:00 app[web.1]: npm ERR! e-commerce#0.1.0 start: `per-env`
2021-12-28T01:10:47.482361+00:00 app[web.1]: npm ERR! spawn ENOENT
2021-12-28T01:10:47.482406+00:00 app[web.1]: npm ERR!
2021-12-28T01:10:47.482446+00:00 app[web.1]: npm ERR! Failed at the e-commerce#0.1.0 start script.
2021-12-28T01:10:47.482482+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-12-28T01:10:47.486127+00:00 app[web.1]:
2021-12-28T01:10:47.486197+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-12-28T01:10:47.486228+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-12-28T01_10_47_483Z-debug.log
2021-12-28T01:10:47.615077+00:00 heroku[web.1]: Process exited with status 1
2021-12-28T01:10:47.682401+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-28T01:19:01.000000+00:00 app[api]: Build started by user ivanleodomin00#gmail.com
2021-12-28T01:19:21.617612+00:00 app[api]: Deploy 481231e4 by user ivanleodomin00#gmail.com
2021-12-28T01:19:21.617612+00:00 app[api]: Release v6 created by user ivanleodomin00#gmail.com
2021-12-28T01:19:22.000000+00:00 app[api]: Build succeeded
2021-12-28T01:19:22.754313+00:00 heroku[web.1]: State changed from crashed to starting
2021-12-28T01:19:25.218296+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-28T01:19:26.154715+00:00 app[web.1]:
2021-12-28T01:19:26.154724+00:00 app[web.1]: > e-commerce#0.1.0 start /app
2021-12-28T01:19:26.154724+00:00 app[web.1]: > npm run server
2021-12-28T01:19:26.154725+00:00 app[web.1]:
2021-12-28T01:19:26.358957+00:00 app[web.1]:
2021-12-28T01:19:26.358959+00:00 app[web.1]: > e-commerce#0.1.0 server /app
2021-12-28T01:19:26.358959+00:00 app[web.1]: > nodemon server.js
2021-12-28T01:19:26.358960+00:00 app[web.1]:
2021-12-28T01:19:26.363664+00:00 app[web.1]: sh: 1: nodemon: not found
2021-12-28T01:19:26.367517+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-12-28T01:19:26.367670+00:00 app[web.1]: npm ERR! syscall spawn
2021-12-28T01:19:26.367739+00:00 app[web.1]: npm ERR! file sh
2021-12-28T01:19:26.367822+00:00 app[web.1]: npm ERR! errno ENOENT
2021-12-28T01:19:26.370782+00:00 app[web.1]: npm ERR! e-commerce#0.1.0 server: `nodemon server.js`
2021-12-28T01:19:26.370823+00:00 app[web.1]: npm ERR! spawn ENOENT
2021-12-28T01:19:26.370876+00:00 app[web.1]: npm ERR!
2021-12-28T01:19:26.370924+00:00 app[web.1]: npm ERR! Failed at the e-commerce#0.1.0 server script.
2021-12-28T01:19:26.370966+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-12-28T01:19:26.373409+00:00 app[web.1]:
2021-12-28T01:19:26.373479+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-12-28T01:19:26.373515+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-12-28T01_19_26_371Z-debug.log
2021-12-28T01:19:26.381218+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-12-28T01:19:26.381440+00:00 app[web.1]: npm ERR! errno 1
2021-12-28T01:19:26.385033+00:00 app[web.1]: npm ERR! e-commerce#0.1.0 start: `npm run server`
2021-12-28T01:19:26.385078+00:00 app[web.1]: npm ERR! Exit status 1
2021-12-28T01:19:26.385133+00:00 app[web.1]: npm ERR!
2021-12-28T01:19:26.385190+00:00 app[web.1]: npm ERR! Failed at the e-commerce#0.1.0 start script.
2021-12-28T01:19:26.385249+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-12-28T01:19:26.388004+00:00 app[web.1]:
2021-12-28T01:19:26.388101+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-12-28T01:19:26.388128+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-12-28T01_19_26_385Z-debug.log
2021-12-28T01:19:26.532464+00:00 heroku[web.1]: Process exited with status 1
2021-12-28T01:19:26.580646+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-28T02:10:34.000000+00:00 app[api]: Build started by user ivanleodomin00#gmail.com
2021-12-28T02:10:55.246466+00:00 app[api]: Release v7 created by user ivanleodomin00#gmail.com
2021-12-28T02:10:55.246466+00:00 app[api]: Deploy 408cc0e7 by user ivanleodomin00#gmail.com
2021-12-28T02:10:56.000000+00:00 app[api]: Build succeeded
2021-12-28T02:10:56.665889+00:00 heroku[web.1]: State changed from crashed to starting
2021-12-28T02:10:59.192072+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-28T02:11:00.408464+00:00 app[web.1]:
2021-12-28T02:11:00.408486+00:00 app[web.1]: > e-commerce#0.1.0 start /app
2021-12-28T02:11:00.408486+00:00 app[web.1]: > node server.js
2021-12-28T02:11:00.408486+00:00 app[web.1]:
2021-12-28T02:11:00.924625+00:00 app[web.1]: Tue, 28 Dec 2021 02:11:00 GMT express-session deprecated undefined resave option; provide resave option at server.js:19:9
2021-12-28T02:11:00.925307+00:00 app[web.1]: Tue, 28 Dec 2021 02:11:00 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at server.js:19:9
2021-12-28T02:11:00.925975+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2021-12-28T02:11:00.925976+00:00 app[web.1]: designed for a production environment, as it will leak
2021-12-28T02:11:00.925976+00:00 app[web.1]: memory, and will not scale past a single process.
2021-12-28T02:11:01.052123+00:00 app[web.1]: listen on port 4747
2021-12-28T02:11:59.280273+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2021-12-28T02:11:59.310519+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-12-28T02:11:59.457957+00:00 heroku[web.1]: Process exited with status 137
2021-12-28T02:11:59.513246+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-28T02:11:59.517764+00:00 heroku[web.1]: State changed from crashed to starting
2021-12-28T02:12:01.776449+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-28T02:12:02.697087+00:00 app[web.1]:
2021-12-28T02:12:02.697102+00:00 app[web.1]: > e-commerce#0.1.0 start /app
2021-12-28T02:12:02.697102+00:00 app[web.1]: > node server.js
2021-12-28T02:12:02.697103+00:00 app[web.1]:
2021-12-28T02:12:03.109575+00:00 app[web.1]: Tue, 28 Dec 2021 02:12:03 GMT express-session deprecated undefined resave option; provide resave option at server.js:19:9
2021-12-28T02:12:03.109947+00:00 app[web.1]: Tue, 28 Dec 2021 02:12:03 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at server.js:19:9
2021-12-28T02:12:03.110335+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2021-12-28T02:12:03.110336+00:00 app[web.1]: designed for a production environment, as it will leak
2021-12-28T02:12:03.110336+00:00 app[web.1]: memory, and will not scale past a single process.
2021-12-28T02:12:03.270410+00:00 app[web.1]: listen on port 4747
2021-12-28T02:13:02.321588+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2021-12-28T02:13:02.385589+00:00 heroku[web.1]: Stopping process with SIGKILL
2021-12-28T02:13:02.423619+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2021-12-28T02:13:02.555802+00:00 heroku[web.1]: Process exited with status 22
2021-12-28T02:13:02.619496+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-28T02:24:06.811349+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=devmusic-e.herokuapp.com request_id=b963cdda-25f1-40ad-ad48-453d230fd1d0 fwd="181.165.54.184" dyno= connect= service= status=503 bytes= protocol=https
2021-12-28T02:24:07.567128+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=devmusic-e.herokuapp.com request_id=e4181dab-522f-4d25-8cf7-571e2f47abb2 fwd="181.165.54.184" dyno= connect= service= status=503 bytes= protocol=https
2021-12-28T02:27:20.713535+00:00 app[api]: Starting process with command `rails console` by user ivanleodomin00#gmail.com
2021-12-28T02:27:23.597696+00:00 heroku[run.8831]: Awaiting client
2021-12-28T02:27:23.612526+00:00 heroku[run.8831]: Starting process with command `rails console`
2021-12-28T02:27:23.768779+00:00 heroku[run.8831]: State changed from starting to up
2021-12-28T02:27:26.931258+00:00 heroku[run.8831]: Process exited with status 127
2021-12-28T02:27:26.991577+00:00 heroku[run.8831]: State changed from up to complete
2021-12-28T02:27:32.365105+00:00 app[api]: Starting process with command `rails console` by user ivanleodomin00#gmail.com
2021-12-28T02:27:35.374067+00:00 heroku[run.9154]: Awaiting client
2021-12-28T02:27:35.382164+00:00 heroku[run.9154]: State changed from starting to up
2021-12-28T02:27:35.392551+00:00 heroku[run.9154]: Starting process with command `rails console`
2021-12-28T02:27:38.713398+00:00 heroku[run.9154]: Process exited with status 127
2021-12-28T02:27:38.759105+00:00 heroku[run.9154]: State changed from up to complete
2021-12-28T02:30:02.434663+00:00 app[api]: Starting process with command `rails console` by user ivanleodomin00#gmail.com
2021-12-28T02:30:05.749584+00:00 heroku[run.5828]: Awaiting client
2021-12-28T02:30:05.759879+00:00 heroku[run.5828]: State changed from starting to up
2021-12-28T02:30:05.766832+00:00 heroku[run.5828]: Starting process with command `rails console`
2021-12-28T02:30:09.092845+00:00 heroku[run.5828]: Process exited with status 127
2021-12-28T02:30:09.145510+00:00 heroku[run.5828]: State changed from up to complete
2021-12-28T02:33:06.079727+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=devmusic-e.herokuapp.com request_id=49e83d77-278f-470d-9f6b-fa7706e1584c fwd="181.165.54.184" dyno= connect= service= status=503 bytes= protocol=https
2021-12-28T02:33:06.764438+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=devmusic-e.herokuapp.com request_id=3b4a6dac-235a-4a9f-b6e5-0a29ff44616e fwd="181.165.54.184" dyno= connect= service= status=503 bytes= protocol=https

Heroku error on deployment - ( Request Timeout )

I have a reactjs / nodejs app being run, and I am trying to host with Heroku... The app is deployed live, but I cant actually load anything. In my logs I see this:
2021-04-18T23:41:58.000000+00:00 app[api]: Build succeeded
2021-04-18T23:42:14.395000+00:00 app[web.1]: npm WARN shared#1.0.0 No description
2021-04-18T23:42:14.422024+00:00 app[web.1]: npm WARN shared#1.0.0 No repository field.
2021-04-18T23:42:14.422890+00:00 app[web.1]:
2021-04-18T23:42:14.682226+00:00 app[web.1]: added 1 package from 6 contributors and audited 486 packages in 17.344s
2021-04-18T23:42:15.300879+00:00 app[web.1]: found 56017 vulnerabilities (40514 low, 15 moderate, 15488 high)
2021-04-18T23:42:15.300903+00:00 app[web.1]: run `npm audit fix` to fix them, or `npm audit` for details
2021-04-18T23:42:15.361457+00:00 app[web.1]: /app/.heroku/node/lib/node_modules/shared -> /app/shared
2021-04-18T23:42:15.391152+00:00 app[web.1]: /app/react-web/node_modules/shared -> /app/.heroku/node/lib/node_modules/shared -> /app/shared
2021-04-18T23:42:16.015673+00:00 app[web.1]:
2021-04-18T23:42:16.015683+00:00 app[web.1]: > react-web#0.1.0 start /app/react-web
2021-04-18T23:42:16.015687+00:00 app[web.1]: > node --max_old_space_size=2560 checkEnvironmentForBuild && react-app-rewired start
2021-04-18T23:42:16.015687+00:00 app[web.1]:
2021-04-18T23:42:20.857742+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.225.30/
2021-04-18T23:42:20.858248+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2021-04-18T23:42:20.858378+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/react-web/public
2021-04-18T23:42:20.858506+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2021-04-18T23:42:20.858836+00:00 app[web.1]: Starting the development server...
2021-04-18T23:42:20.858837+00:00 app[web.1]:
2021-04-18T23:42:21.460296+00:00 heroku[web.1]: State changed from starting to up
2021-04-18T23:42:52.656047+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=cleaningassistant.herokuapp.com request_id=3b1180dc-c080-4624-8a97-d9247577dc3f fwd="99.249.30.56" dyno=web.1 connect=0ms service=30001ms status=503 bytes=0 protocol=https
it is basically saying Request Timeout, when all my start scripts are correct. The only thing it could be looking for is for me to define a port. The problem is, this isn't a nodejs app, its reactjs, so not sure what to do there.
app set up:
please let me know if anyone has any suggestions.

Heroko application error with node js

First time using Heroko. Followed the steps and my build was successful but when I go to the URL I got an application error. I looked in the logs but I'm not really sure whats happening, below is the list of logs I had
2016-08-04T14:24:15.352519+00:00 heroku[web.1]: State changed from crashed to starting
2016-08-04T14:24:31.776384+00:00 heroku[web.1]: Starting process with command `node server.js`
2016-08-04T14:24:34.211793+00:00 app[web.1]: keyword api listening at http://[::]:8088
2016-08-04T14:25:32.328147+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-08-04T14:25:32.327930+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-08-04T14:25:32.501167+00:00 heroku[web.1]: State changed from starting to crashed
2016-08-04T14:25:32.503024+00:00 heroku[web.1]: State changed from crashed to starting
2016-08-04T14:25:32.477573+00:00 heroku[web.1]: Process exited with status 137
2016-08-04T14:25:36.445941+00:00 heroku[web.1]: Starting process with command `node server.js`
2016-08-04T14:25:39.335482+00:00 app[web.1]: keyword api listening at http://[::]:8088
2016-08-04T14:26:37.186681+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-08-04T14:26:37.186681+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-08-04T14:26:37.329330+00:00 heroku[web.1]: Process exited with status 137
2016-08-04T14:26:37.353704+00:00 heroku[web.1]: State changed from starting to crashed
2016-08-04T14:26:37.619772+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shielded-temple-17247.herokuapp.com request_id=db8eb419-e950-4768-8a3f-319a84f7d4e2 fwd="2.125.30.1" dyno= connect= service= status=503 bytes=
2016-08-04T14:26:38.809203+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=shielded-temple-17247.herokuapp.com request_id=5661b532-80af-40cb-8ae3-0bf9868b5e0f fwd="2.125.30.1" dyno= connect= service= status=503 bytes=
What do you have defined in your Procfile? Right now, it appears to be something like this:
web: node server.js
The Procfile tells Heroku how to run your application. The logs you showed indicate that you are trying to run your Node server on port 8088 -- this is likely the issue.
Heroku doesn't allow you to run your server on ANY port you want -- instead, it will dynamically tell you what port to run your server on when your application starts. It does this through the usage of an environment variable named PORT.
What you need to do is modify your server.js code so that you start your server on process.env.PORT.
Here's an example (in express.js):
var express = require('express');
var app = express();
app.listen(process.env.PORT);
That will successfully start up a Node server on Heroku by automatically binding to the correct port.
Hope that helps!

How to connect to a mongodb database on Heroku using mongoose?

Currently my app works fine locally and can connect to my local database.
Right now this is the error I am getting when i try and run it on heroku:
2014-04-17T06:32:23.404458+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-04-17T06:32:23.404460+00:00 app[web.1]: > node app.js
2014-04-17T06:32:24.052231+00:00 app[web.1]: /public/images/test_image.jpg
2014-04-17T06:32:24.090050+00:00 app[web.1]: Database connection error, fcukkk: [Error: failed to connect to [localhost:27017]]
2014-04-17T06:32:24.084553+00:00 app[web.1]: Express server listening on port 23569
2014-04-17T06:32:24.630834+00:00 heroku[web.1]: State changed from starting to up
2014-04-17T06:33:08.084028+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/ host=pure-cliffs-4076.herokuapp.com request_id=9bf3db67-e00e-428a-896c-26c03dfa01ff fwd="68.99.126.105" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0
2014-04-17T06:33:08.094792+00:00 app[web.1]: GET / 200 29995ms
2014-04-17T06:33:08.624842+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=pure-cliffs-4076.herokuapp.com request_id=d09fe61e-f608-47fd-9b1f-a5b4ea54a2a9 fwd="68.99.126.105" dyno=web.1 connect=1ms service=8ms status=404 bytes=193
2014-04-17T06:33:08.620901+00:00 app[web.1]: GET /favicon.ico 404 5ms
2014-04-17T06:33:44.013253+00:00 heroku[web.1]: State changed from up to starting
2014-04-17T06:33:43.925737+00:00 heroku[api]: Add mongolab:sandbox add-on by marshall.a.x#gmail.com
2014-04-17T06:33:43.925801+00:00 heroku[api]: Release v4 created by marshall.a.x#gmail.com
2014-04-17T06:33:47.537662+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-04-17T06:33:48.704235+00:00 he
roku[web.1]: Starting process with command `npm start`
2014-04-17T06:33:49.868707+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-04-17T06:33:49.868699+00:00 app[web.1]:
2014-04-17T06:33:49.868711+00:00 app[web.1]:
2014-04-17T06:33:49.868709+00:00 app[web.1]: > node app.js
2014-04-17T06:33:50.254949+00:00 app[web.1]: /public/images/test_image.jpg
2014-04-17T06:33:50.274924+00:00 app[web.1]: Database connection error, fcukkk: [Error: failed to connect to [localhost:27017]]
2014-04-17T06:33:50.271844+00:00 app[web.1]: Express server listening on port 21153
2014-04-17T06:33:49.631038+00:00 heroku[web.1]: Process exited with status 143
2014-04-17T06:33:50.361358+00:00 heroku[web.1]: State changed from starting to up
2014-04-17T07:38:52.772530+00:00 heroku[web.1]: Idling
2014-04-17T07:38:52.773249+00:00 heroku[web.1]: State changed from up to down
2014-04-17T07:38:56.398500+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-04-17T07:38:59.466635+00:00 heroku[web.1]: Process exited with status 143
2014-04-17T18:18:34.665450+00:00 heroku[web.1]: Unidling
2014-04-17T18:18:34.665450+00:00 heroku[web.1]: State changed from down to starting
2014-04-17T18:18:39.773345+00:00 heroku[web.1]: Starting process with command `npm start`
2014-04-17T18:18:41.209327+00:00 app[web.1]:
2014-04-17T18:18:41.209334+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-04-17T18:18:41.209336+00:00 app[web.1]: > node app.js
2014-04-17T18:18:41.209466+00:00 app[web.1]:
2014-04-17T18:18:41.831107+00:00 app[web.1]: /public/images/test_image.jpg
2014-04-17T18:18:41.863975+00:00 app[web.1]: Database connection error, fcukkk: [Error: failed to connect to [localhost:27017]]
2014-04-17T18:18:41.859394+00:00 app[web.1]: Express server listening on port 56521
2014-04-17T18:18:41.983113+00:00 heroku[web.1]: State changed from starting to up
2014-04-17T18:19:12.750685+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/ host=pure-cliffs-4076.herokuapp.com request_id=b7e7cab0-e79f-4457-9e5d-1acbfd494ef0 fwd="68.99.126.105" dyno=web.1 connect=5ms service=30001ms status=503 bytes=0
2014-04-17T18:19:12.754834+00:00 app[web.1]: GET / 200 29995ms
2014-04-17T19:21:21.596778+00:00 heroku[web.1]: Idling
2014-04-17T19:21:21.597514+00:00 heroku[web.1]: State changed from up to down
2014-04-17T19:21:26.046285+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-04-17T19:21:28.181093+00:00 heroku[web.1]: Process exited with status 143
2014-04-17T20:56:21.949618+00:00 heroku[web.1]: Unidling
2014-04-17T20:56:21.949987+00:00 heroku[web.1]: State changed from down to starting
2014-04-17T20:56:31.657944+00:00 heroku[web.1]: Starting process with command `npm start`
2014-04-17T20:56:33.655866+00:00 app[web.1]:
2014-04-17T20:56:33.655871+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-04-17T20:56:33.655873+00:00 app[web.1]: > node app.js
2014-04-17T20:56:33.655875+00:00 app[web.1]:
2014-04-17T20:56:34.682567+00:00 app[web.1]: /public/images/test_image.jpg
2014-04-17T20:56:34.706650+00:00 app[web.1]: Database connection error, fcukkk: [Error: failed to connect to [localhost:27017]]
2014-04-17T20:56:34.703013+00:00 app[web.1]: Express server listening on port 21923
2014-04-17T20:56:35.308394+00:00 heroku[web.1]: State changed from starting to up
2014-04-17T20:57:08.004131+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/ host=pure-cliffs-4076.herokuapp.com request_id=033a5a44-68a3-4b1c-8f6c-5755371d076d fwd="68.99.126.105" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0
2014-04-17T20:57:08.005107+00:00 app[web.1]: GET / 200 29992ms
2014-04-17T21:17:36.623084+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path=/ host=pure-cliffs-4076.herokuapp.com request_id=1117b0b1-da9d-4fef-ad79-f1a5c4178807 fwd="68.99.126.105" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0
2014-04-17T21:17:36.625513+00:00 app[web.1]: GET / 200 30000ms
2014-04-17T22:07:00.807923+00:00 heroku[web.1]: Idling
2014-04-17T22:07:00.809134+00:00 heroku[web.1]: State changed from up to down
2014-04-17T22:07:04.732639+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-04-17T22:07:07.514765+00:00 heroku[web.1]: Process exited with status 143
2014-04-17T22:32:27+00:00 heroku[slug-compiler]: Slug compilation started
2014-04-17T22:33:00+00:00 heroku[slug-compiler]: Slug compilation finished
2014-04-17T22:33:00.065665+00:00 heroku[web.1]: State changed from down to starting
2014-04-17T22:32:59.921981+00:00 heroku[api]: Deploy 0e3a24a by marshall.a.x#gmail.com
2014-04-17T22:32:59.922073+00:00 heroku[api]: Release v5 created by marshall.a.x#gmail.com
2014-04-17T22:33:05.771395+00:00 heroku[web.1]: Starting process with command `npm start`
2014-04-17T22:33:07.654364+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-04-17T22:33:07.654367+00:00 app[web.1]:
2014-04-17T22:33:07.654366+00:00 app[web.1]: > node app.js
2014-04-17T22:33:07.654359+00:00 app[web.1]:
2014-04-17T22:33:08.435746+00:00 app[web.1]: /public/images/test_image.jpg
2014-04-17T22:33:08.474993+00:00 app[web.1]: Express server listening on port 20321
2014-04-17T22:33:08.771030+00:00 app[web.1]: sup stud, Database connected.
2014-04-17T22:33:08.770901+00:00 app[web.1]: Succeeded connected to: mongodb://mongodb://heroku_app24230415:l91npmc6qlrdole3ptlq0s8not#ds045157.mongolab.com:45157/heroku_app24230415/images
2014-04-17T22:33:08.577315+00:00 heroku[web.1]: State changed from starting to up
2014-04-17T22:33:48.606992+00:00 app[web.1]: []
2014-04-17T22:33:49.143625+00:00 heroku[router]: at=info method=GET path=/ host=pure-cliffs-4076.herokuapp.com request_id=982dd016-e68c-4190-a41e-c3a6780a06ef fwd="68.99.126.105" dyno=web.1 connect=2ms service=624ms status=500 bytes=7683
2014-04-17T22:33:49.176065+00:00 app[web.1]: 13| form(method="POST" action="/view/#{image._id}" enctype="multipart/form-data")
2014-04-17T22:33:49.176067+00:00 app[web.1]: 14| input(type="image" src="/images/#{image.source}" name="bigImage" width="300")
2014-04-17T22:33:49.176068+00:00 app[web.1]:
2014-04-17T22:33:49.176060+00:00 app[web.1]: 10| li
2014-04-17T22:33:49.176070+00:00 app[web.1]: Cannot read property 'source' of undefined
2014-04-17T22:33:49.176050+00:00 app[web.1]: TypeError: /app/views/index.jade:11
2014-04-17T22:33:49.176063+00:00 app[web.1]: 12| span
2014-04-17T22:33:49.176062+00:00 app[web.1]: > 11| img(src="/images/#{image.source}" name="original")
2014-04-17T22:33:49.176058+00:00 app[web.1]: 9| each image in images
2014-04-17T22:33:49.176078+00:00 app[web.1]: at res (/app/node_modules/jade/lib/jade.js:173:38)
2014-04-17T22:33:49.176071+00:00 app[web.1]: at eval (eval at <anonymous> (/app/node_modules/jade/lib/jade.js:172:8), <anonymous>:78:56)
2014-04-17T22:33:49.176073+00:00 app[web.1]: at eval (eval at <anonymous> (/app/node_modules/jade/lib/jade.js:172:8), <anonymous>:165:4)
2014-04-17T22:33:49.176075+00:00 app[web.1]: at eval (eval at <anonymous> (/app/node_modules/jade/lib/jade.js:172:8), <anonymous>:184:21)
2014-04-17T22:33:49.176079+00:00 app[web.1]: at Object.exports.render (/app/node_modules/jade/lib/jade.js:269:10)
2014-04-17T22:33:49.176084+00:00 app[web.1]: at View.render (/app/node_modules/express/lib/view.js:76:8)
2014-04-17T22:33:49.176081+00:00 app[web.1]: at Object.exports.renderFile (/app/node_modules/jade/lib/jade.js:305:18)
2014-04-17T22:33:49.176082+00:00 app[web.1]: at View.exports.renderFile [as engine] (/app/node_modules/jade/lib/jade.js:290:21)
2014-04-17T22:33:49.176087+00:00 app[web.1]: at ServerResponse.res.render (/app/node_modules/express/lib/response.js:798:7)
2014-04-17T22:33:49.176085+00:00 app[web.1]: at Function.app.render (/app/node_modules/express/lib/application.js:504:10)
2014-04-17T22:33:49.181859+00:00 app[web.1]: GET / 500 607ms
This is the relevant part of my app.js file:
var uristring= 'mongodb://'+process.env.MONGOLAB_URI+'/images';
var theport = process.env.PORT || 5000;
var appDir = path.dirname(require.main.filename);
mongoose.connect(uristring, function(err,res){
if (err) {
console.log('ERROR connecting to: '+uristring+'. ' + err)
}
else {
console.log('Succeeded connected to: '+uristring);
}
});
var conn = mongoose.connection;
conn.on('error', console.error.bind(console, 'Database connection error, fcukkk:'));
conn.once('open', function callback() {console.log("sup stud, Database connected.")});
I am confused because there is no mention in the docs https://devcenter.heroku.com/articles/nodejs-mongoose of actually creating the database that I am trying to connect to. I assume this is something that mongoose does when you initially connect to the db.
Do you realize that you are connecting successfully at the end of the log? The first 3 times it looked for your DB at localhost:27017, but the 4th time it looked for the proper address (it seems).

Categories

Resources