2

我正在尝试使用以下命令在 Google App/Compute Engine 上部署托管 VM(Python):

 gcloud --verbosity debug preview  app deploy ./app.yaml --set-default

在部署期间创建了 VM 实例,但它因错误退出(这里是最后几行列表的粘贴):

DEBUG: Display disabled.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
DEBUG: Loaded Command Group: ['gcloud', 'compute', 'copy_files']
DEBUG: Detected docker environment variables: DOCKER_HOST=tcp://104.197.50.238:2376, DOCKER_CERT_PATH=../../../../../tmp/tmpPbKmOs, DOCKER_TLS_VERIFY=True
INFO: Starting new HTTPS connection (1): 104.197.50.238
DEBUG: Failed to connect to Docker daemon due to an SSL problem: [Errno 1] _ssl.c:523: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
DEBUG: (gcloud.preview.app.deploy) Couldn't connect to the Docker daemon due to an SSL problem.
Traceback (most recent call last):
File "/home/zdenulo/bin/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 591, in Execute
result = args.cmd_func(cli=self, args=args)
File "/home/zdenulo/bin/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1191, in Run
resources = command_instance.Run(args)
File "/home/zdenulo/bin/google-cloud-sdk/./lib/googlecloudsdk/appengine/app_commands/deploy.py", line 208, in Run
implicit_remote_build)
File "/home/zdenulo/bin/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/deploy_command_util.py", line 137, in BuildAndPushDockerImages
with docker_util.DockerHost(cli, version_id, remote) as docker_client:
File "/home/zdenulo/bin/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/docker_util.py", line 215, in __enter__
return containers.NewDockerClient(local=(not self._remote), **kwargs)
File "/home/zdenulo/bin/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/docker/containers.py", line 313, in NewDockerClient
'Couldn\'t connect to the Docker daemon due to an SSL problem.' + msg)
DockerDaemonConnectionError: Couldn't connect to the Docker daemon due to an SSL problem.
ERROR: (gcloud.preview.app.deploy) Couldn't connect to the Docker daemon due to an SSL problem.

显然 SSL 存在问题,但我不知道如何解决它,我现在非常绝望:) 我有:

  • Docker 版本 1.8.2,构建 0a8c2e3
  • Boot2Docker-cli 版本:v1.8.0 Git 提交:9a26066
  • 谷歌云 SDK 0.9.79

app 2015.09.23
app-engine-java 1.9.26
app-engine-python 1.9.26
bq 2.0.18
bq-nix 2.0.18
core 2015.09.23
core-nix 2015.09.03
gcloud 2015.09.21
gsutil 4.15
gsutil-nix 4.14
预览 2015.09.21

  • OpenSuse 13.2
  • OpenSSL 1.0.1k-fips 2015 年 1 月 8 日

我将非常感谢任何形式的帮助。

编辑:

应用程序.yaml

module: default
runtime: python27
api_version: 1
threadsafe: yes
vm: true

resources:
  cpu: .5
  memory_gb: 1.3

manual_scaling:
  instances: 1

handlers:
- url: .*
  script: main.app
4

2 回答 2

1

你在 OS X 上使用自制 Python 吗?如果是这样,这里存在 OpenSSL 和 Docker 的错误。

解决这个问题的最简单方法是临时使用带有系统 python 的 virtualenv。

pip install virtualenv
virtualenv ~/system-python-env
source ~/system-python-env
gcloud preview app deploy ...
于 2015-09-24T23:01:20.440 回答
0

您可以使用“gcloud docker --authorize-only”获得短暂的 SSL。然后立即执行“gcloud preview app deploy..”。

gcloud docker --authorize-only
gcloud preview app deploy app.yaml --promote
于 2015-12-01T13:20:55.870 回答