Can't connect to container via powershell or command line, but kitematic appears to work?

Expected behavior

docker ps

Actual behavior

docker ps
An error occurred trying to connect: Get https://127.0.0.1:2376/v1.23/containers/json: dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it.

Information

uploaded diag 976D799A-73D6-47A1-BFB4-6C46C074D5E7/2016-06-11_19-57-17
docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:20:08 2016
OS/Arch: windows/amd64
An error occurred trying to connect: Get https://127.0.0.1:2376/v1.23/version: dial tcp 127.0.0.1:2376: connectex: No connection could be made because the target machine actively refused it.

  • the output of:
    • pinata diagnose -u on OSX
    • DockerDebugInfo.ps1 using Powershell on Windows
      from logs
      [19:57:20.076][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[cce8] 192.168.65.2:35179 -> 192.168.65.1 cce8 Query:0 na:c:r:rn 0 <qs:docker.com. <A|IN>> an: au: <ad: <IN|0> [EDNS0 (version:0, UDP: 4096, flags: )]>
      [19:57:20.076][ProxyProcess ][Info ] Handle DNS query ;; opcode: QUERY, status: NOERROR, id: 52456 ;; flags: rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; QUESTION SECTION: ;docker.com. IN A ;; ADDITIONAL SECTION: ;; OPT PSEUDOSECTION: ; EDNS: version 0; flags: ; udp: 4096
      [19:57:20.082][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[cce8] Forwarding to 10.0.75.1
      [19:57:20.089][ProxyProcess ][Info ] Search for dns server…
      [19:57:20.101][ProxyProcess ][Info ] Server: onhub.here
      [19:57:20.106][ProxyProcess ][Info ] Address: 192.168.86.1
      [19:57:20.111][ProxyProcess ][Info ]
      [19:57:20.116][ProxyProcess ][Info ] Name: localhost
      [19:57:20.120][ProxyProcess ][Info ] Address: 127.0.0.1
      [19:57:20.125][ProxyProcess ][Info ]
      [19:57:20.130][ProxyProcess ][Info ]
      [19:57:20.134][ProxyProcess ][Info ] Found dns server 192.168.86.1
      [19:57:20.139][ProxyProcess ][Info ] Forward DNS query on udp to 192.168.86.1:53
      [19:57:20.192][ProxyProcess ][Info ] Got response ;; opcode: QUERY, status: NOERROR, id: 52456 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1 ;; QUESTION SECTION: ;docker.com. IN A ;; ANSWER SECTION: docker.com. 59 IN A 54.88.126.221 docker.com. 59 IN A 52.6.128.209 docker.com. 59 IN A 52.4.27.208 ;; ADDITIONAL SECTION: ;; OPT PSEUDOSECTION: ; EDNS: version 0; flags: ; udp: 512
      [19:57:20.192][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[cce8] 192.168.65.2:35179 <- 192.168.65.1 cce8 Response:0 na:c:r:ra 0 <qs:docker.com. <A|IN>> <an:docker.com <IN|59> [A (52.4.27.208)],docker.com <IN|59> [A (52.6.128.209)],docker.com <IN|59> [A (54.88.126.221)]> au: <ad: <IN|0> [EDNS0 (version:0, UDP: 512, flags: )]>
      [19:57:20.197][ProxyProcess ][Info ] Handle DNS query ;; opcode: QUERY, status: NOERROR, id: 11750 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.docker.com. IN A
      [19:57:20.202][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[2de6] 192.168.65.2:33347 -> 192.168.65.1 2de6 Query:0 na:c:r:rn 0 <qs:www.docker.com. <A|IN>> an: au: ad:
      [19:57:20.206][ProxyProcess ][Info ] Forward DNS query on udp to 192.168.86.1:53
      [19:57:20.210][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[2de6] Forwarding to 10.0.75.1
      [19:57:20.213][ProxyProcess ][Info ] Handle DNS query ;; opcode: QUERY, status: NOERROR, id: 12050 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.docker.com. IN AAAA
      [19:57:20.218][ProxyProcess ][Info ] Forward DNS query on udp to 192.168.86.1:53
      [19:57:20.215][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[2f12] 192.168.65.2:33347 -> 192.168.65.1 2f12 Query:0 na:c:r:rn 0 <qs:www.docker.com. <AAAA|IN>> an: au: ad:
      [19:57:20.223][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[2f12] Forwarding to 10.0.75.1
      [19:57:20.250][ProxyProcess ][Info ] Got response ;; opcode: QUERY, status: NOERROR, id: 12050 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.docker.com. IN AAAA ;; AUTHORITY SECTION: docker.com. 822 IN SOA ns-207.awsdns-25.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
      [19:57:20.250][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[2f12] 192.168.65.2:33347 <- 192.168.65.1 2f12 Response:0 na:c:r:ra 0 <qs:www.docker.com. <AAAA|IN>> an: <au:docker.com <IN|822> [SOA (ns-207.awsdns-25.com,awsdns-hostmaster.amazon.com, 1,7200,900,1209600,86400)]> ad:
      [19:57:20.269][ProxyProcess ][Info ] Got response ;; opcode: QUERY, status: NOERROR, id: 11750 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.docker.com. IN A ;; ANSWER SECTION: www.docker.com. 299 IN A 104.239.220.248
      [19:57:20.269][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[2de6] 192.168.65.2:33347 <- 192.168.65.1 2de6 Response:0 na:c:r:ra 0 <qs:www.docker.com. <A|IN>> <an:www.docker.com <IN|299> [A (104.239.220.248)]> au: ad:
      [19:57:20.274][ProxyProcess ][Debug ] com.docker.slirp.exe: TCP 104.239.220.248:80 > 192.168.65.2:45552 connecting
      [19:57:20.277][ProxyProcess ][Debug ] com.docker.slirp.exe: Socket.TCPV4.connect_v4 104.239.220.248:80: connecting
      [19:57:20.331][ProxyProcess ][Debug ] com.docker.slirp.exe: TCP 104.239.220.248:80 > 192.168.65.2:45552 connected
      [19:57:20.526][ProxyProcess ][Debug ] com.docker.slirp.exe: TCP 104.239.220.248:80 > 192.168.65.2:45552 closing: l2r = 77 bytes bytes at 396 bytes/sec and 5.1 IOPS/sec; r2l = 43.2 KiB bytes at 226.3 KiB/sec and 41.9 IOPS/sec
      [19:57:20.537][ProxyProcess ][Debug ] com.docker.slirp.exe: TCP 104.239.220.248:80 > 192.168.65.2:45552 Socket.Stream.close
      [19:57:20.565][NamedPipeClient][Info ] Received response for DownloadVmLogs
      [19:57:20.561][NamedPipeServer][Info ] DownloadVmLogs done.
      [20:00:00.192][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[7945] 192.168.65.2:40064 -> 192.168.65.1 7945 Query:0 na:c:r:rn 0 <qs:pool.ntp.org. <A|IN>> an: au: ad:
      [20:00:00.196][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[7945] Forwarding to 10.0.75.1
      [20:00:00.200][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[7ad5] 192.168.65.2:40064 -> 192.168.65.1 7ad5 Query:0 na:c:r:rn 0 <qs:pool.ntp.org. <AAAA|IN>> an: au: ad:
      [20:00:00.208][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[7ad5] Forwarding to 10.0.75.1
      [20:00:00.194][ProxyProcess ][Info ] Handle DNS query ;; opcode: QUERY, status: NOERROR, id: 31045 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;pool.ntp.org. IN A
      [20:00:00.216][ProxyProcess ][Info ] Search for dns server…
      [20:00:00.222][ProxyProcess ][Info ] Handle DNS query ;; opcode: QUERY, status: NOERROR, id: 31445 ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;pool.ntp.org. IN AAAA
      [20:00:00.250][ProxyProcess ][Info ] Server: onhub.here
      [20:00:00.254][ProxyProcess ][Info ] Address: 192.168.86.1
      [20:00:00.256][ProxyProcess ][Info ]
      [20:00:00.258][ProxyProcess ][Info ] Name: localhost
      [20:00:00.261][ProxyProcess ][Info ] Address: 127.0.0.1
      [20:00:00.265][ProxyProcess ][Info ]
      [20:00:00.270][ProxyProcess ][Info ]
      [20:00:00.273][ProxyProcess ][Info ] Found dns server 192.168.86.1
      [20:00:00.271][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[7ad5] 192.168.65.2:40064 <- 192.168.65.1 7ad5 Response:0 na:c:r:ra 0 <qs:pool.ntp.org. <AAAA|IN>> an: <au:pool.ntp.org <IN|1489> [SOA (b.ntpns.org,hostmaster.pool.ntp.org, 1465699862,5400,5400,1209600,3600)]> ad:
      [20:00:00.278][ProxyProcess ][Debug ] com.docker.slirp.exe: DNS[7945] 192.168.65.2:40064 <- 192.168.65.1 7945 Response:0 na:c:r:ra 0 <qs:pool.ntp.org. <A|IN>> <an:pool.ntp.org <IN|116> [A (132.163.4.101)],pool.ntp.org <IN|116> [A (96.126.105.86)],pool.ntp.org <IN|116> [A (148.167.132.200)],pool.ntp.org <IN|116> [A (129.250.35.250)]> au: ad:
      [20:00:00.275][ProxyProcess ][Info ] Forward DNS query on udp to 192.168.86.1:53
      [20:00:00.283][ProxyProcess ][Info ] Forward DNS query on udp to 192.168.86.1:53
      [20:00:00.280][ProxyProcess ][Debug ] com.docker.slirp.exe: UDP 192.168.65.2:58951 -> 129.250.35.250:123 len 56
      [20:00:00.288][ProxyProcess ][Debug ] com.docker.slirp.exe: Socket.Datagram.input 129.250.35.250:123: creating UDP NAT rule
      [20:00:00.285][ProxyProcess ][Info ] Got response ;; opcode: QUERY, status: NOERROR, id: 31445 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;pool.ntp.org. IN AAAA ;; AUTHORITY SECTION: pool.ntp.org. 1489 IN SOA b.ntpns.org. hostmaster.pool.ntp.org. 1465699862 5400 5400 1209600 3600
      [20:00:00.293][ProxyProcess ][Info ] Got response ;; opcode: QUERY, status: NOERROR, id: 31045 ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;pool.ntp.org. IN A ;; ANSWER SECTION: pool.ntp.org. 116 IN A 129.250.35.250 pool.ntp.org. 116 IN A 148.167.132.200 pool.ntp.org. 116 IN A 96.126.105.86 pool.ntp.org. 116 IN A 132.163.4.101
      [20:00:01.293][ProxyProcess ][Debug ] com.docker.slirp.exe: UDP 192.168.65.2:45377 -> 129.250.35.250:123 len 56
      [20:01:18.796][ProxyProcess ][Debug ] com.docker.slirp.exe: Socket.Datagram 129.250.35.250:123: expiring UDP NAT rule
      [20:01:18.807][ProxyProcess ][Debug ] com.docker.slirp.exe: Socket.Datagram.input 129.250.35.250:123: shutting down listening thread
  • a reproducible case if this is a bug, Dockerfiles FTW
  • page URL if this is a docs issue or the name of a man page
  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )

Steps to reproduce the behavior

tried re-installing, still didn’t fix. Can ping 10.0.75.1 successfully. Can also run nginx-hello world via kitematic and access via http://dockerhost: in chrome

Hi,

do you have DOCKER_HOST set in your environment? docker seems to try to connect via localhost while for quite a few betas we have switched connecting via a named pipe

rolf

I tried several different variants

including docker.local, I am able to run containers and the containers connect over docker.local port in browsers but still not able to connect via Powershell.

Diagnostic id 976D799A-73D6-47A1-BFB4-6C46C074D5E7/2016-06-24_15-27-43

Fixed! turned out there was still some phantom settings from my old Docker toolbox / Docker machine config that were hanging out in user/appdata folder. I uninstalled, deleted all docker related folders in appdata and finally removed any old env variables that were still left over and did a clean install. That fixed the problem. Looks like it was not installing the service and just the docker client.