【问题标题】:docker-machine with google driver stuck on "Waiting for SSH" while creating machine在创建机器时,带有谷歌驱动程序的 docker-machine 卡在“等待 SSH”上
【发布时间】:2023-03-18 11:00:01
【问题描述】:

操作系统:Debian Buster

$ docker-machine version
docker-machine version 0.13.0, build 9ba6da9

我正在尝试使用 docker-machine 和 google 驱动程序在 GCP 上启动机器。我创建了一个服务帐户密钥,将其保存为 json 并将 GOOGLE_APPLICATION_CREDENTIALS env 变量指向该文件。然后,我运行以下命令并得到以下输出

$ docker-machine create --driver google --google-project <my project id> --google-disk-size 20 --google-zone us-east1-d --google-machine-type n1-standard-1 --google-machine-image "coreos-cloud/global/images/coreos-stable-1520-8-0-v20171026" --google-username core --google-use-internal-ip vm-test
Running pre-create checks...
(vm-test) Check that the project exists
(vm-test) Check if the instance already exists
Creating machine...
(vm-test) Generating SSH Key
(vm-test) Creating host...
(vm-test) Opening firewall ports
(vm-test) Creating instance
(vm-test) Waiting for Instance
(vm-test) Uploading SSH Key
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...

当我检查实例时,我看到正在为用户 core(我在 create 命令中指定的那个)生成一个 SSH 密钥,并与该实例相关联。但是,docker-machine 卡在“等待 SSH 可用”并且没有前进。

一段时间后,docker-machine ls 给出以下输出(create 仍然卡在 Waiting for SSH)

$ docker-machine ls
NAME      ACTIVE   DRIVER   STATE     URL   SWARM   DOCKER   ERRORS
vm-test            google   Timeout                          

【问题讨论】:

    标签: docker virtual-machine docker-machine gcp google-compute-engine


    【解决方案1】:

    解决了。这是因为我使用的是--google-use-internal-ip,所以它尝试使用内部 IP 而不是公共 NATd 连接。

    【讨论】:

      猜你喜欢
      • 2021-01-09
      • 2020-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-16
      • 1970-01-01
      相关资源
      最近更新 更多