【问题标题】:Google Cloud Deployment Error Response: [13] Could not pick a region and/or zoneGoogle Cloud 部署错误响应:[13] 无法选择区域和/或区域
【发布时间】:2015-12-30 17:00:06
【问题描述】:

上下文:关注,“How to Use Pub/Sub with Python”。

问题:将应用部署到 Google Cloud Platform 时出现以下错误:

Error Response: [13] Could not pick a region and/or zone

尝试的解决方法:

  1. 运行gcloud init 以重新应用区域/区域设置。
  2. config.py 中的ZONE 设置为“us-central1-f”。
  3. 使用 gcloud config set app/use_appengine_api false 重置 Google Cloud API。

gcloud info回复:

Google Cloud SDK [90.0.0]

Platform: [Mac OS X, x86_64]
Python Version: [2.7.10 (default, Oct 23 2015, 18:05:06)  [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]]
Python Location: [/Users/.../getting-started-python/6-pubsub/env/bin/python2]
Site Packages: [Enabled]

Installation Root: [/Users/user/google-cloud-sdk]
Installed Components:
  core: [2015.12.07]
  core-nix: [2015.11.24]
  gcloud: []
  gsutil-nix: [4.15]
  gsutil: [4.16]
  bq: [2.0.18]
  bq-nix: [2.0.18]
System PATH: [...]
Cloud SDK on PATH: [True]

Installation Properties: [/Users/user/google-cloud-sdk/properties]
User Config Directory: [/Users/user/.config/gcloud]
User Properties: [/Users/user/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [*******]
Project: [*******]

Current Properties:
  [core]
    project: [*******]
    account: [*******]
    disable_usage_reporting: [True]
  [app]
    use_appengine_api: [true]
    suppress_change_warning: [true]
  [compute]
    region: [us-central1]
    zone: [us-central1-f]

Logs Directory: [/Users/user/.config/gcloud/logs]
Last Log File: [/Users/user/.config/gcloud/logs/2015.12.30/14.29.56.415916.log]

【问题讨论】:

  • 尝试在部署时添加--zone标志。
  • @add --zone 标志:抛出 ERROR: (gcloud.preview.app.deploy) unrecognized arguments: --zone
  • 你能列出gcloud info的输出吗?
  • @Valentin:我已将gcloud info 回复添加为对原始问题的修改。

标签: python google-app-engine google-compute-engine gcloud google-managed-vm


【解决方案1】:

试试gcloud config set compute/zone us-central1-f

【讨论】:

  • 感谢您对 Valentin 的所有帮助。我试过上面的,但结果是一样的。
  • 听起来像一个错误。你能去文档页面并提交一个错误吗?或者,您可以在运行无效的命令后使用gcloud feedback 归档。
  • 此错误已提交为 Bug/Issue 452
【解决方案2】:

重新创建项目似乎已经解决了这个问题。

我无法确定这两个项目设置之间的区别。我想在设置原始项目时,Google 端可能会发生错误。

【讨论】:

  • 我将此标记为正确答案,因为它现在是 Google 的官方解决方案,而不是在其后端解决问题。请参阅错误/问题452
  • 另外,如果您需要维护您的原始项目名称,请参阅关于 Bug/Issue 452 的评论 #8。
猜你喜欢
  • 2015-08-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-15
  • 2017-11-16
  • 2022-10-24
  • 2021-04-13
  • 1970-01-01
相关资源
最近更新 更多