2016-05-15 910 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。

相關問題