【问题标题】:AppEngine App Deploy gives "Failed to copy file."AppEngine App Deploy 给出“无法复制文件”。
【发布时间】:2018-04-13 05:08:18
【问题描述】:

我正在将 Laravel 应用部署到一个新的 App Engine 项目。但我不断收到这个错误。我尝试创建一个新项目并进行部署。

╔════════════════════════════════════════════════════════════╗
╠═ Uploading 9625 files to Google Cloud Storage             ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.                                                                                                                                    
ERROR: (gcloud.app.deploy) Error Response: [3] Errors were encountered while copying files to App Engine.

Details: [
  [
    {
      "@type": "type.googleapis.com/google.rpc.ResourceInfo",
      "description": "Failed to copy file.",
      "resourceName": "https://storage.googleapis.com/staging.rsvp.appspot.com/df4bc71e8832337e997291648609c4e207b5aa55",
      "resourceType": "file"
    }
  ]
]

这是什么问题,我该如何解决?

【问题讨论】:

    标签: google-app-engine laravel-5 google-cloud-platform gcloud


    【解决方案1】:

    这个问题的原因是,我的项目文件夹中有一些大文件 ( > 30Mb )。我删除了它们并重新部署,它没有问题。

    【讨论】:

    • 谢谢!这正是我的问题。
    【解决方案2】:

    正如 OP 已经提到的,原因是大文件。您还可以通过以下方法找出导致问题的文件。

    如果遇到错误如

    Details: [
      [
        {
          "@type": "type.googleapis.com/google.rpc.ResourceInfo",
          "description": "Failed to copy file.",
          "resourceName": "https://storage.googleapis.com/staging.bemmu1-hrd.appspot.com/b463c152ee1498bd4d27c1ea67c7f8e82cb4b220",
          "resourceType": "file"
        }
      ]
    ]
    

    注意出现在 resourceName 中的哈希值,在本例中为 "b463c152ee1498bd4d27c1ea67c7f8e82cb4b220"

    在最近的日志文件中搜索它(我的是/Users/bemmu/.config/gcloud/logs/2019.07.30/00.45.43.657001.log),你会发现它是一个很长的字符串的一部分,在我的例子中:

    ...'templates/envato/images/arrangement.png': {'sourceUrl': 'https://storage.googleapis.com/staging.bemmu1-hrd.appspot.com/b463c152ee1498bd4d27c1ea67c7f8e82cb4b220'...
    

    从这里我可以看到,在我的情况下,有问题的文件是arrangement.png

    【讨论】:

      猜你喜欢
      • 2017-08-17
      • 1970-01-01
      • 1970-01-01
      • 2014-01-28
      • 2020-09-03
      • 2016-08-06
      • 2015-02-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多