【问题标题】:Failure deploying AppEngine version because of timeout由于超时,部署 AppEngine 版本失败
【发布时间】:2016-07-03 11:04:12
【问题描述】:

我正在尝试部署到 Google AppEngine。 (更准确地说:托管虚拟机。)

之前,我尝试在 Windows 中使用云端构建的 Docker 执行此操作,但失败了(请参阅 StackOverflow question);所以现在我在 Linux 上尝试了,Docker 在本地构建。

这也失败了,但原因不同。它在各种 Linux 开发机器上始终失败。当我们从 Google Cloud 中的 Linux 虚拟机运行相同的命令时,它会成功。

我可以做些什么来部署它?

gcloud preview app deploy  /shared/yaml-war/app.yaml --version=joshua20160317a --project=mytest-test1

Linux 控制台输出

gcloud preview app deploy  /shared/yaml-war/app.yaml --version=joshua20160316a --project=mytest-test1WARNING: The `gcloud preview app` surface is rapidly improving. Look out for
changing flags and new commands before the transition out of the `preview`
component. These changes will be documented in the Cloud SDK release notes
<https://dl.google.com/dl/cloudsdk/release/RELEASE_NOTES> and via deprecation notices for changing commands.

If you would like to avoid changing behavior, please pin to a fixed version of
the Google Cloud SDK as described under the "Alternative Methods" section of the
Cloud SDK web site: <https://cloud.google.com/sdk/#alternative>.

You are about to deploy the following modules:
 - mytest-test1/default (from [/shared/yaml-war/app.yaml])
     Deployed URL: [https://joshua20160316a-dot-mytest-test1.appspot.com]
     (add --promote if you also want to make this module available from
     [https://mytest-test1.appspot.com])

Do you want to continue (Y/n)?  Y

Beginning deployment...
Verifying that Managed VMs are enabled and ready.
If this is your first deployment, this may take a while...done.

Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
Warning: Permanently added '104.197.56.233' (ECDSA) to the list of known hosts.
Building and pushing image for module [default]
----------------------------- DOCKER BUILD OUTPUT ------------------------------
^[Beginning teardown of remote build environment (this may take a few seconds).
ERROR: gcloud crashed (SSLError): The write operation timed out

If you would like to report this issue, please run the following command:
  gcloud feedback
Deleted [https://www.googleapis.com/compute/v1/projects/mytest-test1/zones/us-central1-f/instances/gae-builder-vm-joshua20160316a].

本地日志文件的相关部分(比终端说的不多)。

2016-03-16 17:01:05,369 INFO     root            Building docker image mytest-test1.default.joshua20160316a from /shared/yaml-war/Dockerfile:
2016-03-16 17:01:05,369 INFO     ___FILE_ONLY___ ----------------------------- DOCKER BUILD OUTPUT ------------------------------

2016-03-16 17:02:24,730 DEBUG    docker.docker.api.build Looking for auth config
2016-03-16 17:02:24,730 DEBUG    docker.docker.api.build Sending auth config (u'https://bucket.gcr.io', u'https://appengine.gcr.io', u'https://eu.gcr.io', u'https://gcr.io', u'https://us.gcr.io', u'https://asia.gcr.io', u'https://b.gcr.io')
2016-03-16 17:25:07,109 INFO     root            Tearing down remote build vm.
2016-03-16 17:25:07,110 INFO     ___FILE_ONLY___ Beginning teardown of remote build environment (this may take a few seconds).

2016-03-16 17:25:07,110 DEBUG    root            The write operation timed out
Traceback (most recent call last):
  File "/home/joshua/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 609, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "/home/joshua/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 1228, in Run
    resources = command_instance.Run(args)
  File "/home/joshua/google-cloud-sdk/lib/googlecloudsdk/surface/preview/app/deploy.py", line 256, in Run
    remote_build)
  File "/home/joshua/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/deploy_command_util.py", line 177, in BuildAndPushDockerImages
    info.file, docker_client, image_name)
  File "/home/joshua/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/deploy_command_util.py", line 248, in BuildAndPushDockerImage
    image.Build(docker_client)
  File "/home/joshua/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/docker_image.py", line 98, in Build
    nocache=self._nocache, rm=self._rm, pull=False)
  File "/home/joshua/google-cloud-sdk/./lib/third_party/docker/docker/api/build.py", line 97, in build
    timeout=timeout,
  File "/home/joshua/google-cloud-sdk/./lib/third_party/docker/docker/client.py", line 107, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/home/joshua/google-cloud-sdk/./lib/third_party/requests/sessions.py", line 507, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/joshua/google-cloud-sdk/./lib/third_party/requests/sessions.py", line 464, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/joshua/google-cloud-sdk/./lib/third_party/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/home/joshua/google-cloud-sdk/./lib/third_party/requests/adapters.py", line 431, in send
    raise SSLError(e, request=request)
SSLError: The write operation timed out
2016-03-16 17:25:07,114 ERROR    root            gcloud crashed (SSLError): The write operation timed out
2016-03-16 17:25:07,131 INFO     ___FILE_ONLY___ 

【问题讨论】:

    标签: google-app-engine google-cloud-storage google-compute-engine app-engine-flexible


    【解决方案1】:

    因为我无法评论而回答-

    我在使用 gcloud 进行部署时遇到过类似的超时/错误,我总是通过升级 gcloud 工具本身或有时升级 SDK 来解决这个问题。您运行的是最新版本的 gcloud 吗?

    【讨论】:

    • 在过去的几个版本中,我们已经清理了一些类似的问题。运行gcloud components update 可能会解决问题。
    【解决方案2】:

    你的构建失败了,这行:

    ERROR: gcloud crashed (SSLError): The write operation timed out
    

    这可能是从 gcloud 到您的(本地)docker 守护进程的 HTTP 请求。 docker 客户端(即 gcloud)将 docker build 上下文(调用 docker build 的目录的压缩包)发送到 docker 守护进程。看到写超时很奇怪。您的项目是否过大(例如 GiB+)?您是否尝试过在同一目录上运行 vanilla docker build

    您可以尝试--verbosity debug 以获取更多调试信息。实际上,我认为这只会打印出您在日志文件中找到的内容(感谢您粘贴日志文件)。

    【讨论】:

    • 谢谢你,戴夫。我们现在正在处理各种其他构建错误。此错误与那些错误交织在一起,包括以下错误。该构建有时也会成功。我们正在尝试使用容器“云构建”作为替代方案,尽管这也存在问题。 (1) 云存储 JSON API 启用,如上面链接的 SO 项 (2) “.. 将文件复制到 App Engine 时遇到错误。,, 从 Google Cloud Storage 读取时出错。” (3)“从谷歌云存储读取错误。” (没有“复制时遇到错误”)
    • 原问题中的问题是否仍然存在?
    猜你喜欢
    • 2016-07-02
    • 1970-01-01
    • 2017-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多