一天又一天,我突然不能再将我的GoLang项目部署到AppEngine上.我在日志(log)中收到以下错误消息:
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
Update:个
以下是我的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