【发布时间】:2020-11-19 22:56:31
【问题描述】:
标题是不言自明的。我只是下载了flexible-hello-world 应用程序并在没有(几乎)一次修改的情况下部署它 - 我使用这个 app.yaml 将它部署到一个名为 some-service 的服务
# Copyright 2017, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# [START gae_flex_quickstart_yaml]
runtime: nodejs
env: flex
service: some-service
# This sample incurs costs to run on the App Engine flexible environment.
# The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
# [END gae_flex_quickstart_yaml]
我为我的项目启用了一个结算帐户。
它挂在这一行:
...
7104cb4c0c814fa53787009 size: 2385
Finished Step #1
PUSH
DONE
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Updating service [some-service] (this may take several minutes)...⠹
当我转到应用引擎控制台时,我看到它已部署并且可以在此处访问 URL:https://some-service-dot-ashored-cloud-dv.uk.r.appspot.com/
但 502 永远不会消失。
救命!
编辑:
更多信息,虽然它仍然挂在部署命令上,但我在另一个终端运行:
gcloud app instances list --service some-service
我得到:
SERVICE VERSION ID VM_STATUS DEBUG_MODE
some-service 20201119t184828 aef-some--service-20201119t184828-fr7n TERMINATED
编辑 2:
当我尝试 ssh 到它时,我得到了更多的怪异:
gcloud app instances ssh aef-some--service-20201119t184828-fr7n --service some-service --version 20201119t184828
WARNING: This instance is serving live application traffic. Any changes made could
result in downtime or unintended consequences.
Do you want to continue (Y/n)?
Sending public key to instance [apps/ashored-cloud-dv/services/some-service/versions/20201119t184828/instances/aef-some--service-20201119t184828-fr7n].
Waiting for operation [apps/ashored-cloud-dv/operations/9de7b298-f4e9-47a7-8a8e-11411e649d50] to complete...done.
ERROR: gcloud crashed (TypeError): can only concatenate str (not "NoneType") to str
编辑 2:
glcloud --version 输出:
Google Cloud SDK 319.0.0
bq 2.0.62
cloud-build-local
core 2020.11.13
gsutil 4.55
【问题讨论】:
-
挂起是指CLI上更新服务结束时的符号停止滚动吗?通常是 App Engine Flex 应用程序take time to deploy(我尝试了您提供的快速入门,我花了大约 8 分钟)。你能提供你的SDK版本吗?检查您的日志也有帮助
-
@DonnaldCucharo 用版本输出更新了答案,这就是 --verbosity debug 不断提出的问题:
Updating service [some-service] (this may take several minutes)...⠧DEBUG: Operation [apps/ashored-cloud-dv/operations/a2022048-9e4e-44d8-a9c0-a1e2cd8fcd56] not complete. Waiting to retry. -
@DonnaldCucharo - 我完全迷路了。现在,每当我在应用引擎仪表板中为我的新服务点击谷歌提供的 apppot URL 时,它最终都会将该流量引导到我的默认服务。我完全不清楚为什么。
-
如果您仍然遇到该问题,建议您联系 Google Cloud 支持,以便他们了解您的项目的进展情况。
-
啊,好的。 FWIW,gcloud“TypeError”是一个在 gcloud 320.0.0 中修复的错误。当启动操作超时并且没有主机名返回给 gcloud 以使其通过 SSH 访问时,就会发生这种情况。
标签: gcloud app-engine-flexible