【问题标题】:AppEngine Deploy is Conflicting SHA1 sum for a fileAppEngine Deploy 与文件的 SHA1 和冲突
【发布时间】:2018-09-17 08:15:45
【问题描述】:

我想为我们的应用程序部署更新,但 gcloud 命令出现问题,导致“文件的 SHA1 总和冲突”失败。这是输出:

➜ gcloud app deploy xxx-xxx-xxxx.yaml --project xxx-xxx-xxxx --quiet 

Services to deploy:

descriptor:      [/home/vzool/Workspace/xxx-xxxx-xxxxxxxxxxx/xxx-xxx-xxxx.yaml]
source:          [/home/vzool/Workspace/xxx-xxxx-xxxxxxxxxxx]
target project:  [xxx-xxx-xxxx]
target service:  [default]
target version:  [20180917t110153]
target url:      [https://xxx-xxx-xxxx.appspot.com]


Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage                 ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.                                                                                                                                                                              
ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine:
File https://storage.googleapis.com/staging.xxx-xxx-xxxx.appspot.com/c819d7599ceb31df8d4370eed1981defcb5034c6 failed with: Conflicting SHA1 sum for file. Expected "ddb6af3b_cf4bff57_613fb78d_208480fa_1717b3c4" but received "c819d759_9ceb31df_8d4370ee_d1981def_cb5034c6".

Details: [
  [
    {
      "@type": "type.googleapis.com/google.rpc.ResourceInfo",
      "description": "Conflicting SHA1 sum for file. Expected \"ddb6af3b_cf4bff57_613fb78d_208480fa_1717b3c4\" but received \"c819d759_9ceb31df_8d4370ee_d1981def_cb5034c6\".",
      "resourceName": "https://storage.googleapis.com/staging.xxx-xxx-xxxx.appspot.com/c819d7599ceb31df8d4370eed1981defcb5034c6",
      "resourceType": "file"
    }
  ]
]

我确实删除了这个文件c819d7599ceb31df8d4370eed1981defcb5034c6,但每次都会生成新的哈希,删除整个块staging.xxx-xxx-xxxx.appspot.com,我确实清除了Memcache,但尝试所有这些选项都没有运气! :(

我不知道该怎么办了,有什么建议可以帮助我吗?

谢谢

【问题讨论】:

  • 如果您仍然收到此错误,请在 [Issue Tracker] (cloud.google.com/support/docs/issue-trackers) 中提交错误。作为一种潜在的解决方法,请删除存储区下的存储桶 staging.{Your-Project-ID}.appspot.com,因为它会删除任何可能导致此错误的临时文件。
  • @David 感谢您的关心,我找到了解决方案
  • 有同样的问题,这个答案对我有用:stackoverflow.com/a/52894113/8244338

标签: google-app-engine google-cloud-platform google-cloud-storage


【解决方案1】:

我认为经过一段时间的研究后,该应用程序本身具有实时功能,可在您打开实时页面时更新一个文件。 所以,这改变了gcloud 上传的内容。 gcloud 上传然后验证。如果文件在上传后和验证之前更改,gcloud 将在您的脸上出现此错误。哈哈哈^_^

【讨论】:

  • 但是我怎样才能停止这个功能呢?我没有看到任何
【解决方案2】:

OP 的回答似乎表明在gcloud 部署过程中触及了一个文件。

我的解决方案是:

  1. git checkout 一些随机分支
  2. git checkout 我实际上尝试再次部署的分支
  3. 运行gcloud app deploy . --version my_version_id --project my_project_id

【讨论】:

    猜你喜欢
    • 2019-05-31
    • 1970-01-01
    • 2010-12-24
    • 2017-05-17
    • 1970-01-01
    • 2019-12-24
    • 2016-01-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多