创建新的 docker-machine 实例始终无法使用 openstack 驱动程序验证证书

2024-01-02

每次我尝试通过创建一个新实例docker-machine在开放堆栈上,我总是在验证证书时收到此错误。我必须在创建实例后立即重新生成证书才能使用这些实例。

$ docker-machine create --driver openstack --openstack-ssh-user root --openstack-keypair-name "KeyName" --openstack-private-key-file ~/.ssh/id_rsa --openstack-flavor-id 50 --openstack-image-name "Ubuntu-16.04" manager1
Running pre-create checks...
Creating machine...
(staging-worker1) Creating machine...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "xxx.xxx.xxx.xxx:2376": dial tcp xxx.xxx.xxx.xxx:2376: i/o timeout
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.


$ docker-machine regenerate-certs manager1
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...

然后它似乎起作用了

$ docker-machine ssh manager1 pwd
/home/ubuntu

但是当我尝试做 env 时

$ docker-machine env manager1
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "xxx.xxx.xxx.xx:2376": dial tcp xxx.xxx.xxx.xx:2376: i/o timeout
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.

关于可能导致此问题的任何想法?

我已经在 github 中进一步记录了它https://github.com/docker/machine/issues/3829 https://github.com/docker/machine/issues/3829


事实证明,我的托管服务锁定了 Open Stack 安全组规则中除 22、80 和 443 之外的所有内容。我必须添加 2376 TCP Ingress 才能使 docker-machine 命令正常工作。

它有助于解释原因docker-machine ssh有效但没有docker-machine env

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

创建新的 docker-machine 实例始终无法使用 openstack 驱动程序验证证书 的相关文章

随机推荐