gcloud应用部署失败:请求[URL]

时间:2018-11-11 12:44:26

标签: google-app-engine google-cloud-platform app.yaml google-iam

我正在尝试使用gcloud app deploy从我的计算机将React应用程序部署到Google Cloud App Engine。上周末和以前都很好。

我得到以下输出:

$ gcloud app deploy .
Services to deploy:

descriptor:      [REDACTED]
source:          [REDACTED]
target project:  [REDACTED]
target service:  [REDACTED]
target version:  [REDACTED]
target url:      [REDACTED]


Do you want to continue (Y/n)?

Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 0 files to Google Cloud Storage                ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 53d56399-b9ac-4471-8ecb-e06e557523fa status: FAILURE.
Build error details: Build error details not available..
Check the build log for errors: https://console.cloud.google.com/gcr/builds/53d56399-b9ac-4471-8ecb-e06e557523fa?project=995586812495

点击构建日志中的链接,即可转到Google Cloud Console中的Cloud Build日志。以下是该日志的最后一部分。在这一点上还有更多的日志,但是似乎还可以。

Step #1 - "builder": INFO rm_node_modules took 0 seconds
Step #1 - "builder": INFO starting: checking_cached_packages_json_layer
Step #1 - "builder": DEBUG Checking cache for cache_key 75e33f825bb6b991a429a251df57d5c82f04475bb87972004100213e6e245c4d
Step #1 - "builder": INFO checking_cached_packages_json_layer took 0 seconds
Step #1 - "builder": INFO build process for FTL image took 0 seconds
Step #1 - "builder": INFO full build took 0 seconds
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
Step #1 - "builder": "__main__", fname, loader, pkg_name)
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Step #1 - "builder": exec code in run_globals
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__.py", line 65, in <module>
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__.py", line 54, in main
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__/ftl/node/builder.py", line 81, in Build
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__/ftl/node/layer_builder.py", line 60, in BuildLayer
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__/ftl/common/cache.py", line 113, in Get
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__/ftl/common/cache.py", line 137, in _getEntry
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__/ftl/common/cache.py", line 152, in _getLocalEntry
Step #1 - "builder": File "/ftl-v0.9.0.par/__main__/ftl/common/cache.py", line 175, in getEntryFromCreds
Step #1 - "builder": File "/ftl-v0.9.0.par/containerregistry/client/v2_2/docker_image_.py", line 279, in exists
Step #1 - "builder": File "/ftl-v0.9.0.par/containerregistry/client/v2_2/docker_image_.py", line 293, in manifest
Step #1 - "builder": File "/ftl-v0.9.0.par/containerregistry/client/v2_2/docker_image_.py", line 250, in _content
Step #1 - "builder": File "/ftl-v0.9.0.par/containerregistry/client/v2_2/docker_http_.py", line 364, in Request
Step #1 - "builder": containerregistry.client.v2_2.docker_http_.V2DiagnosticException: response: {'status': '403', 'content-length': '288', 'x-xss-protection': '1; mode=block', 'transfer-encoding': 'chunked', 'server': 'Docker Registry', '-content-encoding': 'gzip', 'docker-distribution-api-version': 'registry/2.0', 'cache-control': 'private', 'date': 'Sun, 11 Nov 2018 12:13:02 GMT', 'x-frame-options': 'SAMEORIGIN', 'content-type': 'application/json'}
Step #1 - "builder": Permission denied for "75e33f825bb6b991a429a251df57d5c82f04475bb87972004100213e6e245c4d" from request "/v2/apparat-web/app-engine-tmp/build-cache/ttl-7d/node-cache/manifests/75e33f825bb6b991a429a251df57d5c82f04475bb87972004100213e6e245c4d". : None
Finished Step #1 - "builder"
ERROR
ERROR: build step 1 "gcr.io/gae-runtimes/nodejs8_app_builder:nodejs8_8_12_0_20180928_RC00" failed: exit status 1

如您所见,错误消息是

Permission denied for "75e33f825bb6b991a429a251df57d5c82f04475bb87972004100213e6e245c4d" from request "/v2/apparat-web/app-engine-tmp/build-cache/ttl-7d/node-cache/manifests/75e33f825bb6b991a429a251df57d5c82f04475bb87972004100213e6e245c4d". : None
Finished Step #1 - "builder"

我不明白这是什么意思。我无法将75e33-ID映射到用户帐户,即使我是,它声称拒绝许可的资源是什么,该怎么办?对我来说,似乎是google cloud的内部知识,我不知道如何进行。

任何想法都会受到赞赏。

我尝试过的事情

  • gcloud auth revokegcloud auth login,以确保我使用当前项目的正确帐户登录
  • gcloud config list,并验证当前的project是正确的。
  • 运行gcloud app deploy时,我还验证了项目信息在执行部署之前提示进行确认时是正确的
  • 已验证我的用户帐户(仍)已在Google Cloud Console IAM中添加了正确的角色

3 个答案:

答案 0 :(得分:2)

我有一个非常相似的问题(相同,除了我使用的是python37标准)。 日志中包含以下内容:

Step #1 - "builder": Permission denied for "d7dab0ac46167635bcee11cda0f4dbd2963e1cfeaf021404fa295f99c37070e3" from request "/v2/<project-id>/app-engine-tmp/build-cache/ttl-7d/python-cache/manifests/d7dab0ac46167635bcee11cda0f4dbd2963e1cfeaf021404fa295f99c37070e3". : None

这实际上是GAE配置问题。就我而言,是我删除了数据库(将其移至其他服务)并禁用了计费。

令人震惊的是,我通过简单地为项目重新启用计费来解决了该问题...

答案 1 :(得分:2)

我也收到类似的错误消息,结果证明与计费有关。

如果您要从免费信用转到基于信用卡的帐单,则即使CC已备案,也需要手动进入并“激活”该付费帐单。

答案 2 :(得分:0)

您在跟踪中遇到了与我相同的错误...

Step #1 - "builder": Traceback (most recent call last): Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main Step #1 - "builder": "__main__", fname, loader, pkg_name) Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 72, in _run_code

与我一样,您有一个较旧的版本(py27),似乎已损坏了整个链条 我也在搜寻 无法上传新的py37版本;-(