簡體   English   中英

在Google Cloud Platform上部署Flask應用時出錯

[英]Error while deploying Flask app on Google Cloud Platform

當我嘗試部署到Google App Engine時出現此錯誤:錯誤:(gcloud.app.deploy)錯誤響應:[3]。 這是我在GCP上首次試用Flask應用,因此我不確定如何處理。

ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine:
    File https://storage.googleapis.com/staging.<app_id>.appspot.com/02aad073e7e7b22302caeca9aa3d6aaf227d7d91 failed with: Conflicting SHA1 sum for file. Expected "e0962ea6_8c330ca4_d3fff179_b1f68032_ef476e8e" but received "02aad073_e7e7b223_02caeca9_aa3d6aaf_227d7d91".

Details: [
 [
    {
      "@type": "type.googleapis.com/google.rpc.ResourceInfo",
      "description": "Conflicting SHA1 sum for file. Expected \"e0962ea6_8c330ca4_d3fff179_b1f68032_ef476e8e\" but received \"02aad073_e7e7b223_02caeca9_aa3d6aaf_227d7d91\".",
      "resourceName": "https://storage.googleapis.com/staging.<app_id>.appspot.com/02aad073e7e7b22302caeca9aa3d6aaf227d7d91",
      "resourceType": "file"
    }
 ]
]

對於具有完全相同描述的10個不同資源名稱,總共有10個類似錯誤。 文件的SHA1總和沖突是什么意思? 我嘗試刪除臨時存儲區以刪除與資源名稱相同的臨時文件(在這種情況下為02aad073e7e7b22302caeca9aa3d6aaf227d7d9),導致該錯誤,但似乎不起作用。

您有2個使用相同名稱上傳的不同文件。

要確定這是否確實是您的部署或登台存儲桶的問題,請創建一個新的干凈存儲桶,然后使用該新存儲桶作為登台存儲桶再次嘗試進行部署:

$ gsutil mb gs://new-staging-bucket
$ gcloud app deploy --bucket gs://new-staging-bucket

如果您在清理存儲區時遇到相同的錯誤,那么您將在部署過程中以某種方式上載幾個不同的文件。

如果使用干凈的存儲桶有效,則問題出在部署期間使用的存儲桶。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM