将 NodeJS 应用程序部署到 Google Cloud App Engine 问题
Deploying NodeJS application to Google Cloud App Engine Troubles
我在 Google Cloud App Engine 上部署了一个标准环境 NodeJS 应用程序。该应用程序于 2019 年 11 月首次部署。我现在正在尝试更新代码,但我无法再通过 $ gcloud app deploy
进行部署
- 我试过使用 https://console.cloud.google.com/appengine/quotadetails?cloudshell=true 上的在线控制台以及独立下载的控制台工具。都失败了。
- 该应用程序在本地主机上运行良好。它与在线数据存储通信正常。
- 我试过
$ gcloud app deploy --verbosity=debug
没什么用。
- 我已经通过浏览器中的 Google 云控制台验证了登录信息和帐户信息。乍一看,一切似乎都很完整。
当前错误信息:
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build f3780207-1c95-4b88-8ae0-574fc6ad515b status: FAILURE Build error details: {"error":{"errorType":"BuildError","canonicalCode":"INVALID_ARGUMENT","errorId":"51A062A0","errorMessage":"INFO FTL version node-v0.17.0\nINFO Beginning FTL build for node\nINFO FTL arg passed: exposed_ports None\nINFO ...
此处删除了大量信息...
构建日志中的两个错误:
Step #1 - "builder": containerregistry.client.v2_2.docker_http_.V2DiagnosticException: response: {'status': '403', 'content-length': '288', 'x-xss-protection': '0', 'transfer-encoding': 'chunked', 'server': 'Docker Registry', '-content-encoding': 'gzip', 'docker-distribution-api-version': 'registry/2.0', 'cache-control': 'private', 'date': 'Tue, 04 Aug 2020 18:30:12 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json'}
Step #1 - "builder": Permission denied for "1dc7fa0ed97dedf2b18a5fa82c4847e36cdade4e1d65e024bfb78aacd0cc1a3d" from request "/v2/ccinema-app/app-engine-tmp/build-cache/ttl-7d/node-cache/manifests/1dc7fa0ed97dedf2b18a5fa82c4847e36cdade4e1d65e024bfb78aacd0cc1a3d". : None
app.yaml 文件:
# [START runtime]
runtime: nodejs10
# [END runtime]
instance_class: F2
automatic_scaling:
max_instances: 2
target_cpu_utilization: 0.7
# https://hackernoon.com/trials-and-tribulations-of-google-cloud-hosting-a-tutorial-26395eb25636
service: default
# https://cloud.google.com/appengine/docs/standard/nodejs/serving-static-files
handlers:
# - url: /favicon\.ico
# static_files: favicon.ico
- url: /images
static_dir: public/images
- url: /javascript
static_dir: public/javascript
- url: /stylesheets
static_dir: public/stylesheets
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
我完全不清楚为什么应用程序部署在过去运行良好时现在却失败了。关于为什么部署失败的任何想法?注意,有没有办法将构建日志/错误日志作为附件附加到此帖子?
编辑...
我花了很多时间试图解决这个问题。我想我会尝试一个简单的克隆站点。来自我的 repo 的完全相同的节点内容,而是使用新的应用程序引擎部署拉取一个全新的项目。我无法判断上述问题是部署问题还是代码相关问题。如果我可以创建一个新项目,也许我可以解决我当前项目无法部署的原因。
- 创建一个新项目。
$ gcloud app deploy
Updating service [default]...failed. ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project my-project-xxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=my-project-xxx then retry.
- 我转到列出的 link,点击一系列 link 后,我得到 to here,我看到“结算帐户已关闭”
- 不清楚账户被关闭的原因。
- Google 搜索结果显示 "Reopen a closed Cloud Billing account". 我按照那里的说明进行操作,但缺少“重新打开结算帐户”按钮。这可能有一些原因,包括未解决的付款、暂停等……就我而言,我们有 none 个。没有未解决的账单,记录在案的信用卡仍然有效,没有过期。我就是想不通。
- 更糟糕的是我无法向 Google 寻求有关账单问题的帮助。我什么时候去? (help) --> Contact Billing Support 我收到“抱歉,找不到此页面”的响应。
- 呃,等等 Google 告诉我应该使用 Amazon Web Services 或 Microsoft Azure 而不是 Google Cloud?我浪费了很多时间试图通过模糊的错误消息来解决这个问题,而 AWS / Azure 消息非常清楚。通常 Google 的人比那好得多。
所以即使记录在案的信用卡仍然有效,但与此项目关联的结算帐户已关闭。 $ gcloud app deploy
出现结算帐户问题时的错误消息不会将用户远程引导至实际问题。
我更希望看到类似 糟糕的错误消息,该帐户似乎已关闭。请检查账单明细...。保持简单,使其准确。我不敢相信我是第一个来到这里的人。
我确实拉了一个bug report at Google Issue Tracker.让我们看看它去哪儿了?
我在 Google Cloud App Engine 上部署了一个标准环境 NodeJS 应用程序。该应用程序于 2019 年 11 月首次部署。我现在正在尝试更新代码,但我无法再通过 $ gcloud app deploy
- 我试过使用 https://console.cloud.google.com/appengine/quotadetails?cloudshell=true 上的在线控制台以及独立下载的控制台工具。都失败了。
- 该应用程序在本地主机上运行良好。它与在线数据存储通信正常。
- 我试过
$ gcloud app deploy --verbosity=debug
没什么用。 - 我已经通过浏览器中的 Google 云控制台验证了登录信息和帐户信息。乍一看,一切似乎都很完整。
当前错误信息:
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build f3780207-1c95-4b88-8ae0-574fc6ad515b status: FAILURE Build error details: {"error":{"errorType":"BuildError","canonicalCode":"INVALID_ARGUMENT","errorId":"51A062A0","errorMessage":"INFO FTL version node-v0.17.0\nINFO Beginning FTL build for node\nINFO FTL arg passed: exposed_ports None\nINFO ...
此处删除了大量信息...
构建日志中的两个错误:
Step #1 - "builder": containerregistry.client.v2_2.docker_http_.V2DiagnosticException: response: {'status': '403', 'content-length': '288', 'x-xss-protection': '0', 'transfer-encoding': 'chunked', 'server': 'Docker Registry', '-content-encoding': 'gzip', 'docker-distribution-api-version': 'registry/2.0', 'cache-control': 'private', 'date': 'Tue, 04 Aug 2020 18:30:12 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json'}
Step #1 - "builder": Permission denied for "1dc7fa0ed97dedf2b18a5fa82c4847e36cdade4e1d65e024bfb78aacd0cc1a3d" from request "/v2/ccinema-app/app-engine-tmp/build-cache/ttl-7d/node-cache/manifests/1dc7fa0ed97dedf2b18a5fa82c4847e36cdade4e1d65e024bfb78aacd0cc1a3d". : None
app.yaml 文件:
# [START runtime]
runtime: nodejs10
# [END runtime]
instance_class: F2
automatic_scaling:
max_instances: 2
target_cpu_utilization: 0.7
# https://hackernoon.com/trials-and-tribulations-of-google-cloud-hosting-a-tutorial-26395eb25636
service: default
# https://cloud.google.com/appengine/docs/standard/nodejs/serving-static-files
handlers:
# - url: /favicon\.ico
# static_files: favicon.ico
- url: /images
static_dir: public/images
- url: /javascript
static_dir: public/javascript
- url: /stylesheets
static_dir: public/stylesheets
- url: /.*
secure: always
redirect_http_response_code: 301
script: auto
我完全不清楚为什么应用程序部署在过去运行良好时现在却失败了。关于为什么部署失败的任何想法?注意,有没有办法将构建日志/错误日志作为附件附加到此帖子?
编辑...
我花了很多时间试图解决这个问题。我想我会尝试一个简单的克隆站点。来自我的 repo 的完全相同的节点内容,而是使用新的应用程序引擎部署拉取一个全新的项目。我无法判断上述问题是部署问题还是代码相关问题。如果我可以创建一个新项目,也许我可以解决我当前项目无法部署的原因。
- 创建一个新项目。
$ gcloud app deploy
Updating service [default]...failed. ERROR: (gcloud.app.deploy) Error Response: [7] Access Not Configured. Cloud Build has not been used in project my-project-xxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudbuild.googleapis.com/overview?project=my-project-xxx then retry.
- 我转到列出的 link,点击一系列 link 后,我得到 to here,我看到“结算帐户已关闭”
- 不清楚账户被关闭的原因。
- Google 搜索结果显示 "Reopen a closed Cloud Billing account". 我按照那里的说明进行操作,但缺少“重新打开结算帐户”按钮。这可能有一些原因,包括未解决的付款、暂停等……就我而言,我们有 none 个。没有未解决的账单,记录在案的信用卡仍然有效,没有过期。我就是想不通。
- 更糟糕的是我无法向 Google 寻求有关账单问题的帮助。我什么时候去? (help) --> Contact Billing Support 我收到“抱歉,找不到此页面”的响应。
- 呃,等等 Google 告诉我应该使用 Amazon Web Services 或 Microsoft Azure 而不是 Google Cloud?我浪费了很多时间试图通过模糊的错误消息来解决这个问题,而 AWS / Azure 消息非常清楚。通常 Google 的人比那好得多。
所以即使记录在案的信用卡仍然有效,但与此项目关联的结算帐户已关闭。 $ gcloud app deploy
出现结算帐户问题时的错误消息不会将用户远程引导至实际问题。
我更希望看到类似 糟糕的错误消息,该帐户似乎已关闭。请检查账单明细...。保持简单,使其准确。我不敢相信我是第一个来到这里的人。
我确实拉了一个bug report at Google Issue Tracker.让我们看看它去哪儿了?