由于 SSL 而无法连接到 Docker 守护程序



我试图在谷歌应用程序/计算引擎上部署托管虚拟机(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,build 0a8c2e3
  • Boot2Docker-cli版本:v1.8.0 Git commit: 9a26066
  • Google Cloud SDK 0.9.79

应用2015.09.23
app-engine-java 1.9.26
app-engine-python 1.9.26
bq 2.0.18
bq-nix 2.0.18
核心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日
我将非常感谢任何形式的帮助。 编辑:

app.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

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

解决这个问题最简单的方法是在system python中临时使用一个虚拟环境。

pip install virtualenv
virtualenv ~/system-python-env
source ~/system-python-env
gcloud preview app deploy ...

您可以使用"gcloud docker——authorize-only"获得短寿命SSL。然后立即执行"gcloud预览应用部署.."。

gcloud docker --authorize-only
gcloud preview app deploy app.yaml --promote

相关内容

  • 没有找到相关文章

最新更新