在python应用程序中成功部署后显示应用程序错误

时间:2021-02-11 11:43:49

标签: python-3.x django heroku

我在 Django 中创建了一个新的 Python 项目,然后将应用程序部署到 Heroku。当我打开应用程序时,它会显示应用程序错误消息。

据我所知,我的日志没有指出任何错误,但我在加载网站时收到以下错误:

应用程序发生错误,无法提供您的页面。如果您是应用程序所有者,请检查您的日志以了解详细信息。您可以使用命令从 Heroku CLI 执行此操作。

您可以在下面找到日志。我在这里遗漏了什么吗?

   (foodtasker) C:\Users\nikku\Desktop\foodtasker>heroku logs --tail
    2021-02-11T10:52:05.964281+00:00 app[api]: Release v1 created by user nkarnwal07
    @gmail.com
    2021-02-11T10:52:05.964281+00:00 app[api]: Initial release by user nkarnwal07@gm
    ail.com
    2021-02-11T10:52:06.223875+00:00 app[api]: Enable Logplex by user nkarnwal07@gma
    il.com
    2021-02-11T10:52:06.223875+00:00 app[api]: Release v2 created by user nkarnwal07
    @gmail.com
    2021-02-11T11:10:53.000000+00:00 app[api]: Build started by user nkarnwal07@gmai
    l.com
    2021-02-11T11:11:06.000000+00:00 app[api]: Build failed -- check your build outp
    ut: https://dashboard.heroku.com/apps/8ca09b4c-2b22-4b60-9bef-ea151d6f0ace/activ
    ity/builds/96248b6d-f0dc-4016-b9bf-228f21fa2a87
    2021-02-11T11:12:31.000000+00:00 app[api]: Build started by user nkarnwal07@gmai
    l.com
    2021-02-11T11:12:45.000000+00:00 app[api]: Build failed -- check your build outp
    ut: https://dashboard.heroku.com/apps/8ca09b4c-2b22-4b60-9bef-ea151d6f0ace/activ
    ity/builds/1a7d4064-5c4a-4e6b-a40a-b937ca3b4446
    2021-02-11T11:16:22.000000+00:00 app[api]: Build started by user nkarnwal07@gmai
    l.com
    2021-02-11T11:16:39.000000+00:00 app[api]: Build failed -- check your build outp
    ut: https://dashboard.heroku.com/apps/8ca09b4c-2b22-4b60-9bef-ea151d6f0ace/activ
    ity/builds/482acec5-04d8-404e-a5f8-aaeaeba66ab7
    2021-02-11T11:18:33.000000+00:00 app[api]: Build started by user nkarnwal07@gmai
    l.com
    2021-02-11T11:19:06.000000+00:00 app[api]: Build failed -- check your build outp
    ut: https://dashboard.heroku.com/apps/8ca09b4c-2b22-4b60-9bef-ea151d6f0ace/activ
    ity/builds/bb7d467e-cb82-41f6-93cc-8d355d14f52a
    2021-02-11T11:20:17.000000+00:00 app[api]: Build started by user nkarnwal07@gmai
    l.com
    2021-02-11T11:21:02.046625+00:00 app[api]: Running release v3 commands by user n
    karnwal07@gmail.com
    2021-02-11T11:21:02.046625+00:00 app[api]: Attach DATABASE (@ref:postgresql-grac
    eful-45718) by user nkarnwal07@gmail.com
    2021-02-11T11:21:02.058325+00:00 app[api]: Release v4 created by user nkarnwal07
    @gmail.com
    2021-02-11T11:21:02.058325+00:00 app[api]: @ref:postgresql-graceful-45718 comple
    ted provisioning, setting DATABASE_URL. by user nkarnwal07@gmail.com
    2021-02-11T11:21:02.349656+00:00 app[api]: Deploy 15cf89b5 by user nkarnwal07@gm
    ail.com
    2021-02-11T11:21:02.349656+00:00 app[api]: Release v5 created by user nkarnwal07
    @gmail.com
    2021-02-11T11:21:13.000000+00:00 app[api]: Build succeeded
    2021-02-11T11:21:55.731928+00:00 app[api]: Starting process with command `python
     manage.py migrate` by user nkarnwal07@gmail.com
    2021-02-11T11:22:00.717189+00:00 heroku[run.4368]: Awaiting client
    2021-02-11T11:22:00.740738+00:00 heroku[run.4368]: Starting process with command
     `python manage.py migrate`
    2021-02-11T11:22:00.769075+00:00 heroku[run.4368]: State changed from starting t
    o up
    2021-02-11T11:22:10.648169+00:00 heroku[run.4368]: Process exited with status 0
    2021-02-11T11:22:10.714284+00:00 heroku[run.4368]: State changed from up to comp
    lete
    2021-02-11T11:22:38.610857+00:00 app[api]: Starting process with command `python
     manage.py createsuperuser` by user nkarnwal07@gmail.com
    2021-02-11T11:22:44.294229+00:00 heroku[run.1332]: Awaiting client
    2021-02-11T11:22:44.320506+00:00 heroku[run.1332]: Starting process with command
     `python manage.py createsuperuser`
    2021-02-11T11:22:44.322855+00:00 heroku[run.1332]: State changed from starting t
    o up
    2021-02-11T11:23:19.377468+00:00 heroku[run.1332]: Process exited with status 0
    2021-02-11T11:23:19.445119+00:00 heroku[run.1332]: State changed from up to comp
    lete
    2021-02-11T11:23:46.811737+00:00 heroku[router]: at=error code=H14 desc="No web
    processes running" method=GET path="/" host=warm-journey-08688.herokuapp.com req
    uest_id=707c94b9-0edc-4bbd-b1f3-7669a29f4f1f fwd="132.154.179.180" dyno= connect
    = service= status=503 bytes= protocol=https
    2021-02-11T11:23:47.162059+00:00 heroku[router]: at=error code=H14 desc="No web
    processes running" method=GET path="/favicon.ico" host=warm-journey-08688.heroku
    app.com request_id=fb59c120-cf1c-4e9d-9b74-af87b1cfb8a7 fwd="132.154.179.180" dy
    no= connect= service= status=503 bytes= protocol=https
    2021-02-11T11:24:09.647298+00:00 heroku[router]: at=error code=H14 desc="No web
    processes running" method=GET path="/" host=warm-journey-08688.herokuapp.com req
    uest_id=fabec02a-c3c1-4177-9c75-fc5739dc21ca fwd="132.154.179.180" dyno= connect
    = service= status=503 bytes= protocol=https
    2021-02-11T11:25:37.991626+00:00 heroku[router]: at=error code=H14 desc="No web
    processes running" method=GET path="/" host=warm-journey-08688.herokuapp.com req
    uest_id=860b5327-8c92-46e9-a583-bf70e560a1a0 fwd="132.154.179.180" dyno= connect
    = service= status=503 bytes= protocol=https
    2021-02-11T11:29:08.560365+00:00 heroku[router]: at=error code=H14 desc="No web
    processes running" method=GET path="/" host=warm-journey-08688.herokuapp.com req
    uest_id=1cb130f9-4bb7-40e7-853a-4faae19874a1 fwd="132.154.179.180" dyno= connect
    = service= status=503 bytes= protocol=https

我很困惑,我的应用程序在本地运行良好,但在 Heroku 上显示错误,请您帮忙。

提前致谢

1 个答案:

答案 0 :(得分:0)

确保在部署项目之前添加了 Procfile。错误代码 H14 确定没有网络测功机正在运行。