
日复一日,我突然无法再将我的 golang 项目部署到 appengine。我在日志中收到此错误消息:
step #2 - "build": status: downloaded newer image for eu.gcr.io/gae-runtimes/buildpacks/google-gae-18/go/builder:go_20230305_rc00 step #2 - "build": eu.gcr.io/gae-runtimes/buildpacks/google-gae-18/go/builder:go_20230305_rc00 step #2 - "build": ===> analyzing step #2 - "build": error: failed to initialize analyzer: getting previous image: getting config file for image "eu.gcr.io/staticform/app-engine-tmp/app/www/ttl-18h:latest": get https://storage.googleapis.com/eu.artifacts.staticform.appspot.com/containers/images/sha256:af3ff480dc0053108a52bf8b7ec3e45893e4e97c507102ff524b07bc01e03249?access_token=redacted: unexpected status code 404 not found: <?xml version='1.0' encoding='utf-8'?><error><code>nosuchkey</code><message>the specified key does not exist.</message><details>no such object: eu.artifacts.staticform.appspot.com/containers/images/sha256:af3ff480dc0053108a52bf8b7ec3e45893e4e97c507102ff524b07bc01e03249</details></error> finished step #2 - "build" error error: build step 2 "eu.gcr.io/gae-runtimes/buildpacks/google-gae-18/go/builder:go_20230305_rc00" failed: step exited with non-zero status: 1
首先我以为 go 1.11 终于被停用了,但是更改为 1.19 并没有解决问题。使用新服务名称进行部署似乎可行,但更新现有服务则不行。即使我更改了服务版本。
我用我的两个 golang 项目对其进行了测试(其中一个没有任何更改)。我的 java 项目部署得很好。
这是我的部署命令:
立即学习“go语言免费学习笔记(深入)”;
gcloud app deploy --project=staticform --version=1 app.yaml
更新:
这是我的 app.yaml:
runtime: go111
automatic_scaling:
min_idle_instances: 0
max_instances: 1
handlers:
- url: /.*
script: auto
secure: always
- url: /admin/.*
script: auto
secure: always
login: admin事实证明我所需要的只是 --no-cache 选项。我不知道为什么,我也不关心。 ;)
因此使用此命令部署成功:
gcloud app deploy --project=staticform --version=1 --no-cache app.yaml
以上就是我突然无法再将 GoLang 应用程序部署到 Google AppEngine的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号