繁体   English   中英

我在 Heroku 上成功部署了我的 Web 应用程序,但显示应用程序错误

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

我真的需要你的帮助,当我在成功部署应用程序后尝试启动应用程序时,Heroku 显示Application error

我尝试做heroku logs --tail --app my_app_name ,它显示了这一点:

»   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

错误代码“H10”通常与涉及 gunicorn 或 Procfile 的问题有关,因为 heroku 无法启动网络服务器。 在您的日志中,我可以看到:

2022-06-22T10:27:19.802751+00:00 应用程序 [web.1]:bash:gunicorn:找不到命令

所以你应该检查gunicorn是否安装成功,通常使用pip install gunicorn

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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