从一天到另一天,我突然不能再部署我的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项目部署得很好。
下面是我的部署命令:
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
1条答案
按热度按时间oogrdqng1#
结果我所需要的只是
--no-cache
选项,我不知道为什么,也不在乎。)因此,使用此命令部署成功: