首页 > 解决方案 > 部署 gcloud python 应用程序时出错 - 它是什么?

问题描述

尝试通过 gcloud 部署 python Web 应用程序时出现此错误 - 在您编写 gcloud app deploy 代码时出现 y/n 问题之后

  ERROR: (gcloud.app.deploy) The operation "operations/acf.p2-222084527338-d61d0401-cb0a-4f69-a07c-131799bd4cf8" resulted in a failure "[Hook call/poll resulted in failed op for service 'compute.googleapis.com': The service is currently being deactivated and deactivation must complete before activation can occur.
    Help Token: Ae-hA1M43mY8ADlPerCsLr9bUDXGJzibJgQCO0CGx3Kz1JRn6XpVB5Q_ebTfPxKEuaBwHKVFwspMAyx7_epjrFKFEzDDbDBy_oYncVroZlxGECPx] with failed services [compute.googleapis.com]".
    Details: "[<DetailsValueListEntry
     additionalProperties: [<AdditionalProperty
     key: '@type'
     value: <JsonValue
     string_value: 'type.googleapis.com/google.rpc.PreconditionFailure'>>, <AdditionalProperty
     key: 'violations'
     value: <JsonValue
     array_value: <JsonArray
     entries: [<JsonValue
     object_value: <JsonObject

标签: pythongoogle-apiweb-deploymentgcloud

解决方案


您似乎正在部署到 App Engine flex。

这将 Compute Engine 虚拟机用于 (App Engine) 应用实例。

您必须使用|启用 Compute Engine 才能使用 App Engine flex。

我怀疑(!?)您项目中的某个人在您尝试部署应用程序之前禁用了 Compute Engine,它告诉您,如果您想部署到 App Engine flex,则需要(重新)启用 Compute Engine。


推荐阅读