【问题标题】:Application error when pushing django project on heroku在heroku上推送django项目时应用程序错误
【发布时间】:2020-09-12 16:00:34
【问题描述】:

将我的项目推送到 Heroku 后,我收到一个应用程序错误。这是日志尾巴。不明白什么是错误。

2020-05-25T12:55:19.445488+00:00 app[api]: Release v1 created by user menhior1@gmail.com
2020-05-25T12:55:19.445488+00:00 app[api]: Initial release by user menhior1@gmail.com
2020-05-25T12:55:19.847136+00:00 app[api]: Enable Logplex by user menhior1@gmail.com
2020-05-25T12:55:19.847136+00:00 app[api]: Release v2 created by user menhior1@gmail.com
2020-05-25T13:05:38.136490+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=zeyzak-crm1.herokuapp.com request_id=2448cb00-bc19-4bef-8438-427f79461d08 fwd="188.253.224.201" dyno= connect= service= status=502 bytes= protocol=https
2020-05-25T13:05:38.744109+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=zeyzak-crm1.herokuapp.com request_id=05d800b7-6a7a-4c53-8d71-1c9549af2030 fwd="188.253.224.201" dyno= connect= service= status=502 bytes= protocol=https
2020-05-25T16:11:40.000000+00:00 app[api]: Build started by user menhior1@gmail.com
2020-05-25T16:12:18.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/ceb2701d-e110-4d9e-84b7-57167e335f93/activity/builds/b0593212-6cc0-46ff-a114-c52008789e8b
2020-05-25T17:47:14.000000+00:00 app[api]: Build started by user menhior1@gmail.com
2020-05-25T17:48:07.506138+00:00 app[api]: Attach DATABASE (@ref:postgresql-silhouetted-57617) by user menhior1@gmail.com
2020-05-25T17:48:07.506138+00:00 app[api]: Running release v3 commands by user menhior1@gmail.com
2020-05-25T17:48:07.519990+00:00 app[api]: @ref:postgresql-silhouetted-57617 completed provisioning, setting DATABASE_URL. by user menhior1@gmail.com
2020-05-25T17:48:07.519990+00:00 app[api]: Release v4 created by user menhior1@gmail.com
2020-05-25T17:48:08.140682+00:00 app[api]: Deploy 93818386 by user menhior1@gmail.com
2020-05-25T17:48:08.140682+00:00 app[api]: Release v5 created by user menhior1@gmail.com
2020-05-25T17:48:19.000000+00:00 app[api]: Build succeeded
2020-05-25T17:49:04.000000+00:00 app[api]: Build started by user menhior1@gmail.com
2020-05-25T17:49:46.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/ceb2701d-e110-4d9e-84b7-57167e335f93/activity/builds/a191374a-616a-44f3-99fe-62edd9c1f4ca
2020-05-25T20:45:20.752157+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=zeyzak-crm1.herokuapp.com request_id=305386ff-afb0-4d73-bc24-2f92b1c5a816 fwd="194.135.170.230" dyno= connect= service= status=503 bytes= protocol=https
2020-05-25T20:45:32.019483+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=zeyzak-crm1.herokuapp.com request_id=ad49a280-c233-432b-8252-74f0a75ee45e fwd="194.135.170.230" dyno= connect= service= status=503 bytes= protocol=https
2020-05-25T20:52:49.000000+00:00 app[api]: Build started by user menhior1@gmail.com
2020-05-25T20:53:20.459407+00:00 app[api]: Deploy f46f62e9 by user menhior1@gmail.com
2020-05-25T20:53:20.459407+00:00 app[api]: Release v6 created by user menhior1@gmail.com
2020-05-25T20:53:32.000000+00:00 app[api]: Build succeeded
2020-05-25T20:54:19.652413+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=zeyzak-crm1.herokuapp.com request_id=d575c336-bece-4388-a55f-2ffe3b9aecf2 fwd="194.135.170.230" dyno= connect= service= status=503 bytes= protocol=https
2020-05-25T20:54:21.201709+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=zeyzak-crm1.herokuapp.com request_id=a66f1b7e-9429-4685-8537-53f13870dd11 fwd="194.135.170.230" dyno= connect= service= status=503 bytes= protocol=https

这是我项目的结构(crm1是主应用程序,帐户是次要的。两者都包含里面的标准东西。):

--crm1 --crm1
       --accounts
       --static --images
                --css
       --manage.py
       --procfile
       --requirements.txt
       --runtime

我的 procfile 里面有什么:

web: gunicorn crm1.wsgi --log-file -

非常感谢任何想法。

【问题讨论】:

    标签: django python-3.x heroku web-deployment django-3.0


    【解决方案1】:

    如您所见,错误提示没有运行 Web 进程,表示 gunicorn 未启动

    首先检查 gunicorn 是否添加到您的需求文件中 Procfile 的次要名称以大写字母开头 对我来说效果很好

    【讨论】:

    • 感谢您的回复。我将 Procfile 误写为 procfile,这导致了问题。现已修复。
    猜你喜欢
    • 1970-01-01
    • 2013-01-07
    • 2017-03-12
    • 2018-12-13
    • 2020-10-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多