2016-05-15 903 views
1

我每天都在使用docker,但是今天发生了一个问题,没有改变任何东西。我打开码头终端并试图启动我的一个容器。但它给了这个错误:“无连接可以作出,因为目标机器积极拒绝,”我使用的是Windows 10Docker说:由于目标机器积极拒绝,因此无法建立连接

     ##   . 
        ## ## ##  == 
       ## ## ## ## ## === 
      /"""""""""""""""""\___/ === 
     ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~/===- ~~~ 
      \______ o   __/ 
      \ \   __/ 
       \____\_______/ 

docker is configured to use the default machine with IP 192.168.99.100 
For help getting started, check out the docs at https://docs.docker.com 


[email protected] MINGW64 ~ 
$ docker ps 
An error occurred trying to connect: Get http://127.0.0.1:2375/v1.22/containers/json: dial tcp 127.0.0.1:2375: connectex: No connection could be made because the target machine actively refused it. 

[email protected] MINGW64 ~ 
$ docker version 
Client: 
Version:  1.10.2 
API version: 1.22 
Go version: go1.5.3 
Git commit: c3959b1 
Built:  Mon Feb 22 22:37:33 2016 
OS/Arch:  windows/amd64 
An error occurred trying to connect: Get http://127.0.0.1:2375/v1.22/version: dial tcp 127.0.0.1:2375: connectex: No connection could be made because the target machine actively refused it. 

回答

2

“积极地拒绝它”指的是主机发送一个RST,而不是一个ACK时你试图连接。因此它不是你的代码中的问题。要么有阻止连接的防火墙,要么托管服务的进程不在该端口上侦听。这可能是因为它根本没有运行,或者因为它正在监听不同的端口。

一旦你开始托管服务的过程中,尽量netstat -anb(需要管理员权限),以验证它是否正在运行并侦听预期的端口上。

0

我也面临同样的问题,甚至试图通过停止,然后retarting默认机器。

解决方案:最后,我重新启动系统,然后打开新的Docker快速启动终端。之后,我再次运行“docker run hello-world”,然后连接并从library/hello-world中拉出hello-world。

相关问题