【问题标题】:gcloud app deploy suddenly failsgcloud app deploy 突然失败
【发布时间】:2018-03-27 19:37:50
【问题描述】:

我在一个简单的 python 项目上运行 gcloud app deploy 并且部署突然失败。我已经尝试回滚 gcloud 组件版本并回滚我的代码库。

我们尝试了多台计算机和网络,但没有人可以部署。

错误和日志不太清楚:

Errors were encountered while copying files to App Engine.

这是我的 app.yaml:

runtime: python27
api_version: 1
threadsafe: true
default_expiration: '1m'

handlers:
  - url: /assets/
    static_dir: assets/
    secure: always
    http_headers:
      X-Frame-Options: "DENY"
      Strict-Transport-Security: "max-age=2592000; includeSubdomains"
      X-Content-Type-Options: "nosniff"
      X-XSS-Protection: "1; mode=block"
  - url: /build/
    static_dir: build/
    secure: always
    http_headers:
      X-Frame-Options: "DENY"
      Strict-Transport-Security: "max-age=2592000; includeSubdomains"
      X-Content-Type-Options: "nosniff"
      X-XSS-Protection: "1; mode=block"
  - url: /.*
    script: main.app
    secure: always

libraries:
  - name: django
    version: latest
  - name: jinja2
    version: latest
  - name: webapp2
    version: latest

skip_files:
  - node_modules/
  - public/
  - src/
  - ^.git/.*
  - ^node_modules/(.*/)?
  - .*node_modules
  - ^js/(.*/)?
  - ^less/(.*/)?
  - bin/
  - ^(.*/)?.*\.py[co]$

【问题讨论】:

  • 尝试增加gcloud app deploy的详细程度,也许您可​​以获取有关该问题的更多信息,有关详细信息,请参阅--verbosity=VERBOSITYcloud.google.com/sdk/gcloud/reference
  • 只是将@DanCornilescu 所说的加起来,您能否用gcloud app deploy 命令返回的内容更新问题并增加详细程度(与警告和错误级别特别相关)?

标签: google-app-engine gcloud


【解决方案1】:

gcloud 使用云存储桶将您的文件上传到 Google(因为 Google 无法读取您本地计算机上的文件)。您可能会为此列出对默认存储桶的访问权限(我相信是staging.$APPNAME.appspot.com)。

您可以尝试使用--bucket 标志将代码暂存到不同的存储桶,或者如果您发现存储桶丢失,则可以使用gcloud beta app repair 命令重新创建存储桶。

【讨论】:

    猜你喜欢
    • 2020-12-29
    • 1970-01-01
    • 1970-01-01
    • 2019-12-27
    • 1970-01-01
    • 2019-03-22
    • 1970-01-01
    • 2019-04-14
    • 2017-01-09
    相关资源
    最近更新 更多