简体   繁体   English

docker版本在OS X上失败

[英]docker version fails on OS X

I have a fresh, first-time install of boot2docker on OS X 10.10.4 and I am getting the following error: 我在OS X 10.10.4上全新安装了boot2docker,并且遇到以下错误:

$ boot2docker version
Boot2Docker-cli version: v1.7.1
Git commit: 8fdc6f5

$ docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): darwin/amd64
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/version: dial tcp 192.168.59.103:2376: i/o timeout

Everything I read says this problem was fixed in 1.7.1 of boot2docker... what am I missing? 我读到的所有内容都说此问题已在boot2docker的1.7.1中修复...我缺少什么?

Update 1 Upon a suggestion below I tried a few things. 更新1根据下面的建议,我尝试了一些方法。 Here's the output: 这是输出:

$ boot2docker ip
192.168.59.103
$ openssl s_client -connect 192.168.59.103:2376
^C  <--- I gave up after a while... nothing was responding.
$ boot2docker ssh
                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/
 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.7.1, build master : c202798 - Wed Jul 15 00:16:02 UTC 2015
Docker version 1.7.1, build 786b29d
docker@boot2docker:~$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 08:00:27:7B:39:40
          inet addr:192.168.59.103  Bcast:192.168.59.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe7b:3940/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3130 (3.0 KiB)  TX bytes:2442 (2.3 KiB)

Update 2 Should have rebooted... not used to caring about that when not in Windows but it seems something on my Mac had gotten out of whack... now it works. 更新2应该重新启动了……不习惯在Windows以外的环境中使用它,但是我的Mac似乎已经摆脱了麻烦……现在可以使用了。

Please try eval $(boot2docker shellinit) and issue docker version again. 请尝试eval $(boot2docker shellinit)并再次发布eval $(boot2docker shellinit) docker version

If that doesn´t help, please try openssl s_client -connect 192.168.59.103:2376 to see there is something listening on 192.168.59.103:2376 如果那没有帮助,请尝试openssl s_client -connect 192.168.59.103:2376以查看在192.168.59.103:2376监听的内容

If there is nothing listening, then your docker version tries to connect to the wrong address and you have to set your Variable DOCKER_HOST to the right address. 如果没有监听,那么您的docker version尝试连接到错误的地址,并且您必须将Variable DOCKER_HOST设置为正确的地址。

You could also check with boot2docker ssh if boot2docker is up and with boot2docker ip to which ip boot2docker is bound (should be 192.168.59.103). 您还可以使用boot2docker ssh来检查boot2docker是否启动,以及boot2docker ip将boot2docker绑定到的boot2docker ip (应该为192.168.59.103)。

Sadly, I should have done troubleshooting step 1: reboot. 可悲的是,我应该完成故障排除步骤1:重新启动。 For whatever reason, that fixed it. 无论出于什么原因,它都已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM