Google app engine 将App engine flexible降级为App engine标准环境

Google app engine 将App engine flexible降级为App engine标准环境,google-app-engine,gcloud,Google App Engine,Gcloud,我在AppEngineFlex环境上收到了大量账单,所以我决定降级到AppEngine标准环境。我已经用NodeJS编写了我的应用程序,这是推荐的一种 我有一个app.yaml文件,看起来像这样- runtime: nodejs env: flex 因此,我认为只要注释掉这一行,我的应用程序就会从flex环境恢复到标准环境,并停止计费,但在-gcloud部署应用程序开始抛出错误 runtime: nodejs # env: flex 错误- starting build "

我在AppEngineFlex环境上收到了大量账单,所以我决定降级到AppEngine标准环境。我已经用NodeJS编写了我的应用程序,这是推荐的一种

我有一个app.yaml文件,看起来像这样-

runtime: nodejs
env: flex
因此,我认为只要注释掉这一行,我的应用程序就会从flex环境恢复到标准环境,并停止计费,但在-gcloud部署应用程序开始抛出错误

runtime: nodejs
# env: flex
错误-

    starting build "570f00c9-e462-4f2e-8314-ea75df68e590"

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.myapp.appspot.com/ae/2ee45089-8d39-47ad-85f5-f9489c54badc/manifest.json.
Step #0 - "fetcher": Processing 9 files.
Step #0 - "fetcher": ******************************************************
Step #0 - "fetcher": Status:                      SUCCESS
Step #0 - "fetcher": Started:                     2020-08-03T23:42:00Z
Step #0 - "fetcher": Completed:                   2020-08-03T23:42:00Z
Step #0 - "fetcher": Requested workers:    200
Step #0 - "fetcher": Actual workers:         9
Step #0 - "fetcher": Total files:            9
Step #0 - "fetcher": Total retries:          0
Step #0 - "fetcher": GCS timeouts:           0
Step #0 - "fetcher": MiB downloaded:         0.10 MiB
Step #0 - "fetcher": MiB/s throughput:       0.71 MiB/s
Step #0 - "fetcher": Time for manifest:    213.58 ms
Step #0 - "fetcher": Total time:             0.36 s
Step #0 - "fetcher": ******************************************************
Finished Step #0 - "fetcher"
Starting Step #1 - "prep"
Step #1 - "prep": Already have image (with digest): gcr.io/cloud-builders/gcloud
Finished Step #1 - "prep"
Starting Step #2 - "detector"
Step #2 - "detector": Pulling image: us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #2 - "detector": nodejs12_20200711_12_18_2_RC00: Pulling from gae-runtimes/buildpacks/nodejs12/builder
Step #2 - "detector": 5e0f2488a094: Already exists
Step #2 - "detector": 07013743b8c6: Already exists
Step #2 - "detector": 3c2cba919283: Already exists
Step #2 - "detector": 3d34396a5442: Already exists
Step #2 - "detector": 541e48a6a2b5: Already exists
Step #2 - "detector": 34f928489dc6: Already exists
Step #2 - "detector": 64208d02cb2c: Already exists
Step #2 - "detector": 1b7c7906717c: Already exists
Step #2 - "detector": 610bcfea19fe: Already exists
Step #2 - "detector": fbad6c6a4dc9: Already exists
Step #2 - "detector": 9c961dbc83b2: Already exists
Step #2 - "detector": 584a50f27d83: Pulling fs layer
Step #2 - "detector": 229c810fe4b6: Pulling fs layer
Step #2 - "detector": 67f333b251cc: Pulling fs layer
Step #2 - "detector": 67d3732ac306: Pulling fs layer
Step #2 - "detector": fa3555d01e5c: Pulling fs layer
Step #2 - "detector": 7cadee99477d: Pulling fs layer
Step #2 - "detector": 8f7829806b7c: Pulling fs layer
Step #2 - "detector": f6cfa6a7f25d: Pulling fs layer
Step #2 - "detector": c5269ff7ab58: Pulling fs layer
Step #2 - "detector": 52a8b2fcfc34: Pulling fs layer
Step #2 - "detector": b59bca8d4380: Pulling fs layer
Step #2 - "detector": 06f428a8446f: Pulling fs layer
Step #2 - "detector": d77ba4498082: Pulling fs layer
Step #2 - "detector": 2979886df2cc: Pulling fs layer
Step #2 - "detector": afbfc3e27982: Pulling fs layer
Step #2 - "detector": 27046f732e4e: Pulling fs layer
Step #2 - "detector": 7a4302826804: Pulling fs layer
Step #2 - "detector": eb078dded89c: Pulling fs layer
Step #2 - "detector": c661568c601b: Pulling fs layer
Step #2 - "detector": 8b4f47d49eb8: Pulling fs layer
Step #2 - "detector": 4f4fb700ef54: Pulling fs layer
Step #2 - "detector": 67d3732ac306: Waiting
Step #2 - "detector": fa3555d01e5c: Waiting
Step #2 - "detector": 7cadee99477d: Waiting
Step #2 - "detector": 8f7829806b7c: Waiting
Step #2 - "detector": f6cfa6a7f25d: Waiting
Step #2 - "detector": c5269ff7ab58: Waiting
Step #2 - "detector": 52a8b2fcfc34: Waiting
Step #2 - "detector": b59bca8d4380: Waiting
Step #2 - "detector": 06f428a8446f: Waiting
Step #2 - "detector": d77ba4498082: Waiting
Step #2 - "detector": 2979886df2cc: Waiting
Step #2 - "detector": afbfc3e27982: Waiting
Step #2 - "detector": 27046f732e4e: Waiting
Step #2 - "detector": 7a4302826804: Waiting
Step #2 - "detector": eb078dded89c: Waiting
Step #2 - "detector": c661568c601b: Waiting
Step #2 - "detector": 8b4f47d49eb8: Waiting
Step #2 - "detector": 4f4fb700ef54: Waiting
Step #2 - "detector": 584a50f27d83: Verifying Checksum
Step #2 - "detector": 584a50f27d83: Download complete
Step #2 - "detector": 229c810fe4b6: Verifying Checksum
Step #2 - "detector": 229c810fe4b6: Download complete
Step #2 - "detector": fa3555d01e5c: Verifying Checksum
Step #2 - "detector": fa3555d01e5c: Download complete
Step #2 - "detector": 584a50f27d83: Pull complete
Step #2 - "detector": 7cadee99477d: Verifying Checksum
Step #2 - "detector": 7cadee99477d: Download complete
Step #2 - "detector": 229c810fe4b6: Pull complete
Step #2 - "detector": 67d3732ac306: Verifying Checksum
Step #2 - "detector": 67d3732ac306: Download complete
Step #2 - "detector": 67f333b251cc: Verifying Checksum
Step #2 - "detector": 67f333b251cc: Download complete
Step #2 - "detector": 8f7829806b7c: Verifying Checksum
Step #2 - "detector": 8f7829806b7c: Download complete
Step #2 - "detector": c5269ff7ab58: Verifying Checksum
Step #2 - "detector": c5269ff7ab58: Download complete
Step #2 - "detector": f6cfa6a7f25d: Verifying Checksum
Step #2 - "detector": f6cfa6a7f25d: Download complete
Step #2 - "detector": 52a8b2fcfc34: Verifying Checksum
Step #2 - "detector": 52a8b2fcfc34: Download complete
Step #2 - "detector": 06f428a8446f: Verifying Checksum
Step #2 - "detector": 06f428a8446f: Download complete
Step #2 - "detector": b59bca8d4380: Verifying Checksum
Step #2 - "detector": b59bca8d4380: Download complete
Step #2 - "detector": 2979886df2cc: Verifying Checksum
Step #2 - "detector": 2979886df2cc: Download complete
Step #2 - "detector": d77ba4498082: Verifying Checksum
Step #2 - "detector": d77ba4498082: Download complete
Step #2 - "detector": afbfc3e27982: Verifying Checksum
Step #2 - "detector": afbfc3e27982: Download complete
Step #2 - "detector": 27046f732e4e: Verifying Checksum
Step #2 - "detector": 27046f732e4e: Download complete
Step #2 - "detector": eb078dded89c: Verifying Checksum
Step #2 - "detector": eb078dded89c: Download complete
Step #2 - "detector": 7a4302826804: Verifying Checksum
Step #2 - "detector": 7a4302826804: Download complete
Step #2 - "detector": c661568c601b: Verifying Checksum
Step #2 - "detector": c661568c601b: Download complete
Step #2 - "detector": 4f4fb700ef54: Verifying Checksum
Step #2 - "detector": 4f4fb700ef54: Download complete
Step #2 - "detector": 67f333b251cc: Pull complete
Step #2 - "detector": 8b4f47d49eb8: Verifying Checksum
Step #2 - "detector": 8b4f47d49eb8: Download complete
Step #2 - "detector": 67d3732ac306: Pull complete
Step #2 - "detector": fa3555d01e5c: Pull complete
Step #2 - "detector": 7cadee99477d: Pull complete
Step #2 - "detector": 8f7829806b7c: Pull complete
Step #2 - "detector": f6cfa6a7f25d: Pull complete
Step #2 - "detector": c5269ff7ab58: Pull complete
Step #2 - "detector": 52a8b2fcfc34: Pull complete
Step #2 - "detector": b59bca8d4380: Pull complete
Step #2 - "detector": 06f428a8446f: Pull complete
Step #2 - "detector": d77ba4498082: Pull complete
Step #2 - "detector": 2979886df2cc: Pull complete
Step #2 - "detector": afbfc3e27982: Pull complete
Step #2 - "detector": 27046f732e4e: Pull complete
Step #2 - "detector": 7a4302826804: Pull complete
Step #2 - "detector": eb078dded89c: Pull complete
Step #2 - "detector": c661568c601b: Pull complete
Step #2 - "detector": 8b4f47d49eb8: Pull complete
Step #2 - "detector": 4f4fb700ef54: Pull complete
Step #2 - "detector": Digest: sha256:268a9ef00dd901e5f207edd928a7e0ee18c1b62d7868b03211e566eb1c90296c
Step #2 - "detector": Status: Downloaded newer image for us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #2 - "detector": us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #2 - "detector": ======== Output: google.nodejs.yarn-gcp-build@0.9.0 ========
Step #2 - "detector": yarn.lock not found.
Step #2 - "detector": ======== Output: google.nodejs.yarn@0.9.0 ========
Step #2 - "detector": yarn.lock not found.
Step #2 - "detector": ======== Results ========
Step #2 - "detector": skip: google.nodejs.yarn-gcp-build@0.9.0
Step #2 - "detector": fail: google.nodejs.yarn@0.9.0
Step #2 - "detector": pass: google.nodejs.appengine@0.9.0
Step #2 - "detector": ======== Output: google.nodejs.npm-gcp-build@0.9.0 ========
Step #2 - "detector": gcp-build script not found in package.json.
Step #2 - "detector": ======== Results ========
Step #2 - "detector": skip: google.nodejs.npm-gcp-build@0.9.0
Step #2 - "detector": pass: google.nodejs.npm@0.9.0
Step #2 - "detector": pass: google.nodejs.appengine@0.9.0
Step #2 - "detector": Resolving plan... (try #1)
Step #2 - "detector": 2 of 3 buildpacks participating
Step #2 - "detector": google.nodejs.npm       0.9.0
Step #2 - "detector": google.nodejs.appengine 0.9.0
Finished Step #2 - "detector"
Starting Step #3 - "analyzer"
Step #3 - "analyzer": Already have image (with digest): us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00
Step #3 - "analyzer": ERROR: failed to initialize cache: failed to create image cache: accessing cache image "us.gcr.io/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest": connect to repo store 'us.gcr.io/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache:latest': GET https://us.gcr.io/v2/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache/manifests/latest: DENIED: Permission denied for "latest" from request "/v2/myapp/app-engine-tmp/build-cache/ttl-7d/default/buildpack-cache/manifests/latest". 
Finished Step #3 - "analyzer"
ERROR
ERROR: build step 3 "us.gcr.io/gae-runtimes/buildpacks/nodejs12/builder:nodejs12_20200711_12_18_2_RC00" failed: step exited with non-zero status: 1
尝试的事项:

  • 使用
    runtime:nodejs12#(或nodejs10)
    ,而不仅仅是
    runtime:nodejs

  • 删除
    #env:

  • 部署时使用
    --no promote--no stop previous version
    标志。如果有效,请停止和/或删除旧版本

  • 确保您已登录:
    gcloud auth login…


  • 完全删除该行以查看问题是否消失。这可能类似于
    跳过文件:
    ,GAE解释器无法将其识别为注释。此外,请确保在部署Nothing change时为其提供一个新版本,并出现相同的错误。我也确实更改了运行时:nodej10,但无论是否使用它,都无法正常工作。请在部署时尝试使用
    --no promote--no stop previous version
    标志。如果可行,请停止和/或删除旧版本。啊,同样的错误人。。。无论如何,我是否可以只上载yaml文件而不是整个应用程序?是否可以使用--log http和--verbosity=debug标志添加gcloud app deploy命令的输出?(记住编辑任何私人数据)谢谢你,但它不起作用。我两个都试过了,但都不管用。这就是为什么我声明使用
    运行时:nodejs12
    。当您使用
    运行时:nodejs12
    运行时:nodejs10
    时,您会遇到什么错误?好的,对于nodejs10,我会遇到大量错误,但是对于nodejs12,我会出现以下错误-----文件上载完成。更新服务[默认]…失败。错误:(gcloud.app.deploy)错误响应:[9]云构建570f00c9-e462-4f2e-8314-ea75df68e590状态:失败构建错误详细信息:构建错误详细信息不可用。完整构建日志:哦,我检查了我被拒绝权限的错误,为什么?一周前,它运转良好。