拨打tcp 192.168.99.100:2376:i / o超时

时间:2018-04-03 13:03:21

标签: macos docker docker-toolbox

我无法让Docker Toolbox for Mac运行。我几个月前完美地运行了它。但现在,它不断得到错误:

This machine has been allocated an IP address, but Docker Machine could not reach it successfully.

SSH for the machine should still work, but connecting to exposed ports, such as the Docker daemon port (usually <ip>:2376), may not work properly.

You may need to add the route manually, or use another related workaround.

This could be due to a VPN, proxy, or host file configuration issue.

You also might want to clear any VirtualBox host only interfaces you are not using.

第二个错误

Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100: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.

我已卸载并重新安装,并多次删除了所有容器,但仍然遇到相同的错误。

这就是我所做的:

  1. 使用VirtualBox删除所有“仅限主机的适配器”选择机器|设置|网络删除所有仅限主机的适配器
  2. 使用

    删除vboxnet0界面

    VBoxManage hostonlyif删除vboxnet0

  3. 卸载Docker Toolbox for Mac

  4. 停止Docker app。
  5. 删除应用程序目录Docker
  6. 停止所有正在运行的虚拟机(机器重启很好)
  7. 停止VirtualBox
  8. 删除应用程序目录VirtualBox
  9. Bounce vboxnet0界面 sudo ifconfig vboxnet0 down && sudo ifconfig vboxnet0
  10. 重启Mac
  11. 通过https://docs.docker.com/toolbox/toolbox_install_mac/

    下载安装Docker

    docker version

  12. 返回

    Client:
    Version:    18.03.0-ce
    API version:    1.37
    Go version: go1.9.4
    Git commit: 0520e24
    Built:  Wed Mar 21 23:06:22 2018
    OS/Arch:    darwin/amd64
    Experimental:   false
    Orchestrator:   swarm
    
    Server:
     Engine:
      Version:  18.03.0-ce
      API version:  1.37 (minimum version 1.12)
      Go version:   go1.9.4
      Git commit:   0520e24
      Built:    Wed Mar 21 23:14:32 2018
      OS/Arch:  linux/amd64
      Experimental: true
    
    1. 完全删除现有的“构建”机器

      docker-machine rm build

    2. 创建名为“build”的机器

      docker-machine create --driver virtualbox --virtualbox-memory 4096 --engine-opt dns = 9.0.128.50 --engine-opt dns = 9.0.130.50 build

    3. 但我仍然得到与上述相同的错误。

      我已经阅读了一些与此相关的帖子,但似乎没有任何帮助。尝试按照Docker: Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates的建议将--virtualbox-hostonly-cidr“192.168.90.1/24”添加到创建中,但这没有帮助。

      有人有什么想法吗?我完全陷入了困境。

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,问题中没有列出的任何解决方案。

对我来说,帮助我前进的是删除vm目录,

rm -rf $HOME/.docker/machine/machines/default
docker-machine create default
eval "$(docker-machine env default)"

这使所有内容都消失了(丢失了所有图像),但是解决了网络(?)问题。