2

I'm trying to deploy Managed VM (Python) on Google App / Compute Engine with command:

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

during deployment VM instance is created but it exits on error (here is paste of last few lines of listing):

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.

apparently there is problem with SSL but I have no idea how to solve it, and I'm quite desperate at the moment :) I have:

  • Docker version 1.8.2, build 0a8c2e3
  • Boot2Docker-cli version: v1.8.0 Git commit: 9a26066
  • Google Cloud 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
preview 2015.09.21

  • OpenSuse 13.2
  • OpenSSL 1.0.1k-fips 8 Jan 2015

I would very much appreciate help of any kind.

EDIT:

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
zdenulo
  • 346
  • 3
  • 14

2 Answers2

1

Are you using homebrew Python on OS X? If so, there's an existing bug for OpenSSL and Docker here.

The easiest way around this is to temporary use a virtualenv with system python.

pip install virtualenv
virtualenv ~/system-python-env
source ~/system-python-env
gcloud preview app deploy ...
Jon Wayne Parrott
  • 1,341
  • 10
  • 18
  • Can you try installing requests[secure] and see if that succeeds/helps? – Jon Wayne Parrott Sep 25 '15 at 21:56
  • I did, but it doesn't help – zdenulo Sep 27 '15 at 15:44
  • Hmm. There's a lot of things it could be. It could be an issue with your local boot2docker, an issue with python and openssl version, etc. A few things you can try is doing `gcloud preview app deploy app.yaml --set-default --docker-build=remote` to use a GCE-based docker build. You can try using docker machine instead of boot2docker. You can try an isolated python installation with pyenv. – Jon Wayne Parrott Sep 27 '15 at 18:39
  • I've tried to deploy from my Macbook and it's working, so it looks like that I have something messed up on my Linux, but who knows what? :) thanks for advises anyway – zdenulo Oct 07 '15 at 15:20
0

You can get at a short-lived SSL with "gcloud docker --authorize-only". Then immediately do your "gcloud preview app deploy..".

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