简体   繁体   中英

I successfully deployed my web app on Heroku but shows Application Error

I really need your help, Heroku shows Application error when I tried to launch my app after it was successfully deployed.

I tried to do heroku logs --tail --app my_app_name and it shows this :

»   Warning: heroku update available from 7.53.0 to 7.60.2.
2022-06-22T10:23:57.795692+00:00 app[api]: Release v1 created by user my_email
2022-06-22T10:23:57.795692+00:00 app[api]: Initial release by user my_email
2022-06-22T10:23:57.958344+00:00 app[api]: Enable Logplex by user my_email
2022-06-22T10:23:57.958344+00:00 app[api]: Release v2 created by user my_email
2022-06-22T10:24:28.559386+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=optimisation-ptf.herokuapp.com request_id=4b8f35b2-6693-48e9-9fdd-a2f718aa9751 fwd="105.154.76.199" dyno= connect= service= status=502 bytes= protocol=https
2022-06-22T10:24:29.305197+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=optimisation-ptf.herokuapp.com request_id=d044f7fa-791d-4d75-9599-d2c122928813 fwd="105.154.76.199" dyno= connect= service= status=502 bytes= protocol=https
2022-06-22T10:25:54.000000+00:00 app[api]: Build started by user my_email
2022-06-22T10:26:59.517310+00:00 app[api]: Deploy 8aeb2f26 by user my_email
2022-06-22T10:26:59.517310+00:00 app[api]: Release v3 created by user my_email
2022-06-22T10:26:59.535704+00:00 app[api]: Scaled to web@1:Free by user my_email
2022-06-22T10:27:08.977995+00:00 heroku[web.1]: Starting process with command `gunicorn app:run`
2022-06-22T10:27:10.083085+00:00 app[web.1]: bash: gunicorn: command not found
2022-06-22T10:27:10.213860+00:00 heroku[web.1]: Process exited with status 127
2022-06-22T10:27:10.342276+00:00 heroku[web.1]: State changed from starting to crashed
2022-06-22T10:27:10.346020+00:00 heroku[web.1]: State changed from crashed to starting
2022-06-22T10:27:18.822585+00:00 heroku[web.1]: Starting process with command `gunicorn app:run`
2022-06-22T10:27:19.802751+00:00 app[web.1]: bash: gunicorn: command not found
2022-06-22T10:27:19.920381+00:00 heroku[web.1]: Process exited with status 127
2022-06-22T10:27:20.101372+00:00 heroku[web.1]: State changed from starting to crashed
2022-06-22T10:27:25.000000+00:00 app[api]: Build succeeded
2022-06-22T10:27:31.988217+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=optimisation-ptf.herokuapp.com request_id=7f44ed21-8e48-43af-a571-7d73d50e6e37 fwd="105.154.76.199" dyno= connect= service= status=503 bytes= protocol=https
2022-06-22T10:27:33.028530+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=optimisation-ptf.herokuapp.com request_id=7ddf1edf-c07e-4797-ab15-2d4f087f821e fwd="105.154.76.199" dyno= connect= service= status=503 bytes= protocol=https
2022-06-22T10:30:59.278236+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=optimisation-ptf.herokuapp.com request_id=d2f73aa4-e308-49ea-a432-6f4207b62ed9 fwd="105.154.76.199" dyno= connect= service= status=503 bytes= protocol=https
2022-06-22T10:31:00.256718+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=optimisation-ptf.herokuapp.com request_id=10373ca5-a63a-44be-a87f-dd86b5396777 fwd="105.154.76.199" dyno= connect= service= status=503 bytes= protocol=https
2022-06-22T10:42:58.215793+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=optimisation-ptf.herokuapp.com request_id=9db1d5d1-016e-4d80-9c10-8bfe0085bc70 fwd="105.154.76.199" dyno= connect= service= status=503 bytes= protocol=https
2022-06-22T10:43:00.600272+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=optimisation-ptf.herokuapp.com request_id=d068aae6-e249-44b8-9b64-a17ff6091fee fwd="105.154.76.199" dyno= connect= service= status=503 bytes= protocol=https

Error code "H10" is typically related to issues involving gunicorn or Procfile, due to heroku couldn't start the webserver. In your logs, I can see:

2022-06-22T10:27:19.802751+00:00 app[web.1]: bash: gunicorn: command not found

So you should check if gunicorn was successfully installed, usually with pip install gunicorn .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM