google-app-engine - 为什么重定向 stderr 会使我的 App Engine 部署始终失败?
问题描述
我正在部署一个简单的 App Engine 标准环境应用程序。(实际上是最短的,一个 Python 3 “hello world”。)我正在使用带有 zshell 的 Macbook。
如果我将标准错误重定向到文件,我每次都会收到一个错误(如下)。
gcloud app deploy -q 2>>err.log
如果我省略重定向,它每次都会成功。
>
使用or没有区别>>
。使用管道重定向,例如 to grep
,不会导致问题。
所以这是一个“解决方案”(通过传递通过 grep 发送输出),它可以满足我的需要并且不会触发问题,但这是非常迂回的。
gcloud app deploy -q 2>&1 >/dev/null |egrep "." >> err.txt
请注意,我使用的是-q
,所以等待我Y
的批准不是问题。
错误是这样的。(标识符是匿名的。)
..................failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build BUILD_ID status: FAILURE
Build error details: Failed to download at least one file. Cannot continue.
Full build logs: https://console.cloud.google.com/cloud-build/builds/BUILD_ID?project=PROJECT_ID
查看日志,我看到了这一点。
starting build "BUILD_ID"
FETCHSOURCE
BUILD
Starting Step #0 - "fetcher"
Step #0 - "fetcher": Already have image (with digest): gcr.io/cloud-builders/gcs-fetcher
Step #0 - "fetcher": Fetching manifest gs://staging.joshua-playground.appspot.com/ae/BUILD_ID/manifest.json.
Step #0 - "fetcher": Processing 728 files.
Step #0 - "fetcher": Failed to fetch gs://staging.my-project.appspot.com/BUILD_ID, will no longer retry: fetching "gs://staging.my-project.appspot.com/BUILD_ID" with timeout 1h0m0s to temp file "/workspace/.download/staging.joshua-playground.appspot.com-BUILD_ID": err SHA mismatch, got "SHA_VALUE", want "SHA_VALUE"
Step #0 - "fetcher": Failed to download at least one file. Cannot continue.
Finished Step #0 - "fetcher"
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/gcs-fetcher" failed: step exited with non-zero status: 1
解决方案
谷歌已经确认了这个问题。请在此处跟踪。
推荐阅读
- javascript - JavaScript:如何修复未正确分配属性值的实例
- python - 为什么这两种寻找第 n 个斐波那契数的算法中的一种更有效?
- laravel - 如何在 Laravel 中新建 Vue js 的 App.js?
- java - 我需要帮助设置 Java
- java - 如何使用循环神经网络玩简单的 2D Java 游戏?
- php - Printing Numbered Associative Array from MySQLi query in a Loop
- swift - How to present a view controller as a part of a view?
- django - Django 用户表已删除且无法重新迁移
- types - 给定的序言项是二叉树吗
- javascript - 模态图像未出现