Node.js Run Hello World on error deployment errors in google cloud platform

I am on Mac OSX Yosemite, I have an error when I follow the "Start Hello World" step following the Node.JS "Hello World" tutorial for Google Cloud Platform

The original error is shown below:

Nissans-MacBook-Pro:1-hello-world nissan$ gcloud preview app deploy app.yaml --set-default
You are about to deploy the following modules:
 - hello-world-project-1018/default (from [/Users/nissan/source/repos/1-hello-world/app.yaml])
     Deployed URL: [https://hello-world-project-1018.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.

ERROR: (gcloud.preview.app.deploy) Couldn't connect to the docker daemon.
Please consider providing the `--remote` flag to perform a hosted docker build, for which a local docker environment is unnecessary.

If you would like to perform the docker build locally, please check whether the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly.
With boot2docker, you can set them up by running:
  boot2docker shellinit
and executing the commands that boot2docker shows.

      

I followed the advice in the error and included a flag --remote

for the command with the following error:

Nissans-MacBook-Pro:1-hello-world nissan$ gcloud preview app deploy app.yaml --set-default --remote
You are about to deploy the following modules:
 - hello-world-project-1018/default (from [/Users/nissan/source/repos/1-hello-world/app.yaml])
     Deployed URL: [https://hello-world-project-1018.appspot.com]

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

Beginning deployment...
Verifying that Managed VMs are enabled and ready.

Provisioning remote build service.
Created [https://www.googleapis.com/compute/v1/projects/hello-world-project-1018/global/firewalls/allow-gae-builder].
NAME              NETWORK SRC_RANGES RULES    SRC_TAGS TARGET_TAGS
allow-gae-builder default 0.0.0.0/0  tcp:2376
Copying certificates for secure access. You may be prompted to create an SSH keypair.
Warning: Permanently added '104.197.79.93' (RSA) to the list of known hosts.
ERROR: Failed to connect to Docker Daemon due to: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
ERROR: (gcloud.preview.app.deploy) Couldn't connect to the docker daemon.
Please consider providing the `--remote` flag to perform a hosted docker build, for which a local docker environment is unnecessary.

If you would like to perform the docker build locally, please check whether the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly.
With boot2docker, you can set them up by running:
  boot2docker shellinit
and executing the commands that boot2docker shows.

      

Any advice for a solution would be appreciated.

Boot2Docker and Google Cloud Platform versions are listed below:

Boot2Docker-cli version: v1.7.1
Git commit: 8fdc6f5

Google Cloud SDK 0.9.70

app 2015.07.16
bq 2.0.18
bq-nix 2.0.18
core 2015.07.16
core-nix 2015.06.02
gcloud 2015.07.16
gsutil 4.13
gsutil-nix 4.12
preview 2015.07.16

      

+3


source to share


3 answers


I think this issue is related to Python, which installs Homebrew and certificates. See https://github.com/docker/compose/issues/890

My solution was to run brew remove python

, then go to https://www.python.org/downloads/ and download and install the mac python there.



Good news: there is a fix

+1


source


I survived the battle to make it work. I wish I could remember each step, but I'll try to provide as much as I remember below:

  • Install CLI Boot2Docker if not already executed

  • Add the app.yaml file to your project root directory. Here is an example of my running nodejs app: https://gist.github.com/anonymous/7255416f58b56d282e6b - I took this straight from the Google sample node app (bookshelf) .

  • In the project directory, run boot2docker up

    - this will prompt you to run another command with some environment variables that you should set. Without that, I got the error the author received.

That's what:

Waiting for VM and Docker daemon to start...
.o
Started.
Writing /Users/bryan/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/bryan/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/bryan/.boot2docker/certs/boot2docker-vm/key.pem

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_HOST=tcp://192.168.59.103:2376
    export DOCKER_CERT_PATH=/Users/bryan/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

Or run: `eval "$(boot2docker shellinit)"`

      



I ran eval "$(boot2docker shellinit)"

  1. Run gcloud preview app deploy app.yaml --set-default --version X

Note that for some reason I think (not sure) it won't work without the version flag, so try where X is replaced with your application's version number.

I believe these are all the steps I took that finally made it work. Hope this helps at least.

+1


source


Are you sure Boot2docker is enabled. Have you tried running "boot2docker up" and setting environment variables?

0


source







All Articles