Node.js 在 Google Cloud Platform 上运行 Hello World 错误部署错误

2024-06-19

我在 Mac OSX Yosemite 上,当我执行以下步骤“运行 Hello World”时出现错误适用于 Google Cloud Platform 的 Node.JS“Hello World”教程 https://cloud.google.com/nodejs/getting-started/hello-world#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 和 Google Cloud Platform 版本:

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

我认为这个问题与Homebrew安装的Python和证书有关。看https://github.com/docker/compose/issues/890 https://github.com/docker/compose/issues/890

我的解决方案是运行brew remove python然后去https://www.python.org/downloads/ https://www.python.org/downloads/并从那里下载并安装 Mac python。

好消息是有一个修复待定 https://github.com/boot2docker/boot2docker/pull/1029

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Node.js 在 Google Cloud Platform 上运行 Hello World 错误部署错误 的相关文章

随机推荐