【问题标题】:ERROR: (gcloud.app.deploy) Error Response: [13] in deploying flex environment in Google App Engine错误:(gcloud.app.deploy)错误响应:[13] 在 Google App Engine 中部署 flex 环境
【发布时间】:2020-07-20 20:20:34
【问题描述】:

我正在尝试让 GDAL 在 Google App Engine 中工作。我一直在关注this 的帖子。作为部署folder 的一部分,我的脚本和requirements.txt 旁边有一个类似的app.yaml 和Dockerfile。运行后出现以下错误

gcloud app deploy
Updating service [default] (this may take several minutes)...failed.
                                                                                                                                                                                                                 
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation projects
/flex-env-gdal-api/regions/us-central1/operations/230ef197-33ab-43ee-bbac-85b53e6c8fd0 

error [INTERNAL]: An internal error occurred while processing task 
/appengine-flex-v1/insert_flex_deployment/flex_create_resources>
2020-07-20T19:50:34.913Z71509.jo.14: Deployment Manager operation 
flex-env-gdal-api/operation-1595274635522-5aae4d1f830ec-81a3f5de-b5b771bf 

errors: [code: "RESOURCE_ERROR" location: "/deployments/aef-default 20200720t144747/resources/aef-default-20200720t144747" 
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",\"ResourceErrorCode\":\"403\",\"ResourceErrorMessage\":{\"code\":403,\"message\":\"The caller does not have permission\",\"status\":\"PERMISSION_DENIED\",\"statusMessage\":\"Forbidden\",
\"requestPath\":\"https://compute.googleapis.com/compute/beta/projects/flex-env-gdal-api/regions/us-central1/autoscalers\",
\"httpMethod\":\"POST\"}}"
]

环顾四周后,错误响应 [13] 似乎与权限相关联。我在 IAM 中有 Owner 角色,所以我不确定这是否是问题所在。如果有人有任何尝试的建议,我将不胜感激。

【问题讨论】:

    标签: python google-app-engine google-cloud-platform gcloud gdal


    【解决方案1】:

    我遇到过类似的问题,解决方法是将实例数指定为最多两个,这可以通过 manual_scaling 或 max_num_instances 来完成,同时使用 automatic scaling

    您的 app.yaml 文件类似于:

    使用自动缩放

    runtime: custom
    env: flex
    entrypoint: gunicorn -b :$PORT mysite.wsgi
    runtime_config:
      python_version: 3.7
    automatic_scaling:
      min_num_instances: 1
      max_num_instances: 2
    

    使用手动缩放:

    runtime: custom
    env: flex
    entrypoint: gunicorn -b :$PORT mysite.wsgi
    runtime_config:
      python_version: 3.7
    manual_scaling:
      instances: 2
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-07
      • 1970-01-01
      • 1970-01-01
      • 2018-02-14
      • 1970-01-01
      • 2021-06-23
      • 2021-06-06
      • 1970-01-01
      相关资源
      最近更新 更多