我在Mac上,当我按照Node.JS "Hello World" tutorial for Google Cloud Platform执行"Running Hello World“步骤时出现错误
初始错误如下所示:
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.我遵循了错误中的建议,并再次包含了带有以下错误的命令的--remote标志:
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.任何要解决的建议都将不胜感激。
Boot2Docker和谷歌云平台的版本如下所示:
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发布于 2015-08-24 15:30:21
请参阅https://github.com/docker/compose/issues/890
我的解决方案是运行brew remove python,然后转到https://www.python.org/downloads/,从那里下载并安装Mac python。
好消息是有一个fix pending
发布于 2015-08-26 00:38:07
我经历了一场艰苦的战斗才让它起作用。我希望我能记住每一步,但我会尽量在下面提供我记得的内容:
boot2docker up --这将提示您使用一些必须设置的环境变量来运行另一个命令。在不这样做的情况下,我得到了作者得到的错误。这就是:
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)"`我运行了eval "$(boot2docker shellinit)"
运行gcloud preview app deploy app.yaml --set-default --version X的
另外要注意的是,出于某些原因,我认为(不确定)如果没有版本标志,它将无法工作,因此尝试将X替换为您的应用程序的版本号。
我相信,这些都是我采取的最终让它工作的完整步骤。希望这至少能有所帮助。
发布于 2015-08-12 05:22:55
您确定Boot2docker是否已打开。你有没有试过运行"boot2docker up“并设置环境变量?
https://stackoverflow.com/questions/31633228
复制相似问题