求助:GoLang应用无法更新部署至Google AppEngine
Go项目部署Google App Engine时出现404错误(无法获取镜像配置文件)
部署Go项目到Google App Engine时突然失败,日志输出错误如下:
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已停用,但切换至Go 1.19后问题仍未解决
- 测试发现使用新服务名称可正常部署,但更新现有服务(即使修改服务版本号)时会失败
- 已在两个Go项目(其中一个未做任何修改)上验证该问题,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
内容的提问来源于stack exchange,提问作者FLUXparticle
相关产品推荐
相关产品推荐

