Python Django部署教程中的Google应用程序引擎资源错误
我一直在寻找部署Django应用程序的好方法,我发现GoogleAppEngineFlex是一个非常好的解决方案。我在应用程序部署方面没有太多的经验,因此我遵循了有关部署的说明 在最后一步中,教程指示我在cmd提示符下部署应用程序:Python Django部署教程中的Google应用程序引擎资源错误,python,django,google-app-engine,google-cloud-platform,Python,Django,Google App Engine,Google Cloud Platform,我一直在寻找部署Django应用程序的好方法,我发现GoogleAppEngineFlex是一个非常好的解决方案。我在应用程序部署方面没有太多的经验,因此我遵循了有关部署的说明 在最后一步中,教程指示我在cmd提示符下部署应用程序:gcloud app deploy 我跟着。在我得到这个信息之前,一切似乎都很好: Updating service [default] (this may take several minutes)...failed. ERROR: (gcloud.app.depl
gcloud app deploy
我跟着。在我得到这个信息之前,一切似乎都很好:
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation <stuff..> error [INTERNAL]: An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2020-10-10T07:36:04.734Z7747.ue.0: Deployment Manager operation <stuff..> errors: [code: "RESOURCE_ERROR"
location: "<stuff...>"
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",\"ResourceErrorCode\":\"403\",\"ResourceErrorMessage\":{\"code\":403,\"message\":\"The caller does not have permission\",\"status\":\"PERMISSION_DENIED\",\"statusMessage\":\"Forbidden\",\"requestPath\":\"<stuff..>",\"httpMethod\":\"POST\"}}"
]
正在更新服务[默认设置](这可能需要几分钟时间)
过了一会儿,我收到了这样的信息:
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation <stuff..> error [INTERNAL]: An internal error occurred while processing task /app-engine-flex/insert_flex_deployment/flex_create_resources>2020-10-10T07:36:04.734Z7747.ue.0: Deployment Manager operation <stuff..> errors: [code: "RESOURCE_ERROR"
location: "<stuff...>"
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",\"ResourceErrorCode\":\"403\",\"ResourceErrorMessage\":{\"code\":403,\"message\":\"The caller does not have permission\",\"status\":\"PERMISSION_DENIED\",\"statusMessage\":\"Forbidden\",\"requestPath\":\"<stuff..>",\"httpMethod\":\"POST\"}}"
]
更新服务[默认设置](这可能需要几分钟)…失败。
错误:(gcloud.app.deploy)错误响应:[13]Flex操作错误[内部]:处理任务/app engine Flex/insert_Flex_deployment/Flex_create_resources>2020-10-10T07:36:04.734Z7747时发生内部错误。ue.0:部署管理器操作错误:[代码:“RESOURCE_ERROR”
地点:“
消息:“{\'ResourceType\”:\“compute.beta.RegionaAutoScaler\”,“ResourceErrorCode\”:“403\”,“ResourceErrorMessage\”:{\'code\”:403,\“message\”:“调用者没有权限\”,“status\”:“权限被拒绝”,“statusMessage\”:“禁止的”,“requestPath\”:“禁止的”,“httpMethod\:“POST\”
]
每次我重新运行命令
gcloud app deploy
时,我都会得到完全相同的错误。知道怎么解决吗?谷歌搜索不会向我透露任何信息。首先,请尝试为自己授予以下权限。答案将有助于一些解释
另外,尝试在.yaml
文件中添加以下内容,看看是否解决了问题
automatic_scaling:
min_num_instances: 1
max_num_instances: 7
哇,把这些行添加到应用程序中。yaml实际上修复了它。太好了。这似乎是由于缩放实例造成的。其中一个错误实际上并不代表错误是什么。