Deployment fails without prompting any errors on console on digitalocean app-engine django app

huangapple go评论77阅读模式
英文:

Deployment fails without prompting any errors on console on digitalocean app-engine django app

问题

我们有两个应用程序,它们使用相似的设置运行,现在我们尝试部署另一个应用程序,但这次在应用引擎中失败,而不提供任何错误信息。Python Django应用程序启动,然后突然应用引擎停止部署。如何找到原因?

2023-01-10T04:22:27.009643496Z 要执行的操作:
2023-01-10T04:22:27.009843250Z 应用所有迁移:accounts、admin、auth、authtoken、contenttypes、sessions
2023-01-10T04:22:27.025117275Z 正在运行迁移:
2023-01-10T04:22:27.025132491Z 没有要应用的迁移。
2023-01-10T04:22:28.914809605Z [2023-01-10 04:22:28 +0000] [3] [INFO] 启动 gunicorn 20.1.0
2023-01-10T04:22:28.916522026Z [2023-01-10 04:22:28 +0000] [3] [INFO] 监听地址:http://0.0.0.0:5000 (3)
2023-01-10T04:22:28.916664847Z [2023-01-10 04:22:28 +0000] [3] [INFO] 使用工作进程:uvicorn.workers.UvicornWorker
2023-01-10T04:22:28.977228185Z [2023-01-10 04:22:28 +0000] [4] [INFO] 正在启动工作进程,进程 ID:4
2023-01-10T04:22:30.789477002Z [2023-01-10 04:22:30 +0000] [4] [INFO] 启动服务器进程 [4]
2023-01-10T04:22:30.789716598Z [2023-01-10 04:22:30 +0000] [4] [INFO] 等待应用程序启动。
2023-01-10T04:22:30.790170632Z [2023-01-10 04:22:30 +0000] [4] [INFO] ASGI 'lifespan' 协议似乎不受支持。
2023-01-10T04:22:30.790507246Z [2023-01-10 04:22:30 +0000] [4] [INFO] 应用程序启动完成。

Deployment fails without prompting any errors on console on digitalocean app-engine django app

英文:

We have 2 apps that are running with similar settings, now we are trying to deploy another app but this time it's failing without telling any error in app engine. Python django app starts and then suddenly app engine stops deployment. How to find reason behind that?

2023-01-10T04:22:27.009643496Z Operations to perform:
2023-01-10T04:22:27.009843250Z   Apply all migrations: accounts, admin, auth, authtoken, contenttypes, sessions
2023-01-10T04:22:27.025117275Z Running migrations:
2023-01-10T04:22:27.025132491Z   No migrations to apply.
2023-01-10T04:22:28.914809605Z [2023-01-10 04:22:28 +0000] [3] [INFO] Starting gunicorn 20.1.0
2023-01-10T04:22:28.916522026Z [2023-01-10 04:22:28 +0000] [3] [INFO] Listening at: http://0.0.0.0:5000 (3)
2023-01-10T04:22:28.916664847Z [2023-01-10 04:22:28 +0000] [3] [INFO] Using worker: uvicorn.workers.UvicornWorker
2023-01-10T04:22:28.977228185Z [2023-01-10 04:22:28 +0000] [4] [INFO] Booting worker with pid: 4
2023-01-10T04:22:30.789477002Z [2023-01-10 04:22:30 +0000] [4] [INFO] Started server process [4]
2023-01-10T04:22:30.789716598Z [2023-01-10 04:22:30 +0000] [4] [INFO] Waiting for application startup.
2023-01-10T04:22:30.790170632Z [2023-01-10 04:22:30 +0000] [4] [INFO] ASGI 'lifespan' protocol appears unsupported.
2023-01-10T04:22:30.790507246Z [2023-01-10 04:22:30 +0000] [4] [INFO] Application startup complete.

Deployment fails without prompting any errors on console on digitalocean app-engine django app

答案1

得分: 1

我认为您错过了为该特定应用分配正确端口的步骤。默认情况下,DO 设置端口为8080。根据日志,它正在监听端口5000。

2023-01-10T04:22:28.916522026Z [2023-01-10 04:22:28 +0000] [3] [INFO] 正在监听:http://0.0.0.0:5000 (3)

所以可能这就是错误的原因。您可以从数字海洋应用设置中的YAML文件中进行更新。
或者点击与资源相对应的编辑图标以配置详细信息,如HTTP路由或HTTP端口。

英文:

I think you missed assigning the correct port for that specific app. By default DO sets port 8080. And according to logs, it's listening to port 5000.

2023-01-10T04:22:28.916522026Z [2023-01-10 04:22:28 +0000] [3] [INFO] Listening at: http://0.0.0.0:5000 (3)

So probably that could be the mistake. You can update it from the YAML file in the digital ocean app settings.
Or click the edit icon corresponding to the resource to configure details such as HTTP routes or the HTTP port.

huangapple
  • 本文由 发表于 2023年1月9日 05:21:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/75051394.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定