Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django部署教程中的Google应用程序引擎资源错误_Python_Django_Google App Engine_Google Cloud Platform - Fatal编程技术网

Python Django部署教程中的Google应用程序引擎资源错误

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

我一直在寻找部署Django应用程序的好方法,我发现GoogleAppEngineFlex是一个非常好的解决方案。我在应用程序部署方面没有太多的经验,因此我遵循了有关部署的说明

在最后一步中,教程指示我在cmd提示符下部署应用程序:
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实际上修复了它。太好了。这似乎是由于缩放实例造成的。其中一个错误实际上并不代表错误是什么。