Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to connect to docker #16

Closed
cramhead opened this issue Aug 1, 2016 · 15 comments
Closed

Fails to connect to docker #16

cramhead opened this issue Aug 1, 2016 · 15 comments

Comments

@cramhead
Copy link

cramhead commented Aug 1, 2016

Expected behavior

Should connect to docker.io/library/hello-world, download the image and run it

Actual behavior

Network times out

Information

  • A diagnostic was uploaded with id: C83DC67F-0792-40A5-9882-F6F60EE44A9F/2016-08-01_13-46-15
  • Windows 10, Version 1511, OS build 10586.494
    window build
  • Tried with DNS Server set to automatic and fix at 8.8.8.8
  • Running on MacBook Pro hardware
  • Same result with Docker on the Beta channel

Steps to reproduce the behavior

  1. Ensure Hyper-V is installed and running
  2. Install Docker for windows
  3. Open powershell and type docker run hello-world
@nivekastoreth
Copy link

nivekastoreth commented Aug 1, 2016

Same issue here.

Diagnostic: 31B7762B-8EE0-4651-B171-4DEDFF0EEB18/2016-08-01_18-34-31
OS Name: Microsoft Windows 10 Pro
Version: 10.0.10586 Build 10586
Processor: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 4001 Mhz, 4 Core(s), 8 Logical Processor(s)

  • Also tried with fixed DNS, no success
  • Also same results using Beta build

Note(s):

  1. MobyLinuxVM has IP address of 10.0.75.2, log contains many entries regarding IP address 10.0.75.1
[18:42:20.488][ApiProxy       ][Info   ] listen tcp 10.0.75.1:53: bind: The requested address is not valid in its context.
[18:42:20.490][ApiProxy       ][Info   ] Waiting for the port/IP to become available

Log File Attached

@dgageot
Copy link
Member

dgageot commented Aug 2, 2016

Hi @cramhead and @nivekastoreth, thanks for the report! Can you tell us:

  • If you had to disable HyperV after you installed Docker. For eg. to use VirtualBox.
  • What's the output of Get-NetAdapter "vEthernet (DockerNAT)" ran in an elevated PowerShell?

If the command shows multiple net adapters, can you try this command before you restart Docker and see if it fixes the issue?

$vmNetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
Get-NetAdapter "vEthernet (DockerNAT)" | ? { $_.DeviceID -ne $vmNetAdapter.DeviceID } | Disable-NetAdapter -Confirm:$False -PassThru | Rename-NetAdapter -NewName "OLD"

@swilsonau
Copy link

Hi. I am experiencing this issue as well. However, I was able to restore it by manually setting up the NAT and then assigning it to the VM's network adapter.

I mainly followed the below guide. It seems that a change was made to Hyper-V in a recent Windows 10 build.

https://charbelnemnom.com/2016/05/how-to-configure-hyper-v-virtual-switch-that-supports-nat-network-with-powershell-hyperv-powershell/

@glennsills
Copy link

I am getting exactly the same behavior on version 1607 build 14393.10

@nivekastoreth
Copy link

nivekastoreth commented Aug 2, 2016

@dgageot: I started yesterday with virtualbox, hyper-v, docker-machine and docker4windows installed. I've since fully uninstalled all of the above and reinstalled hyper-v and docker4windows.

Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> Get-NetAdapter "vEthernet (DockerNAT)"

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
vEthernet (DockerNAT)     Hyper-V Virtual Ethernet Adapter #2          42 Up           00-15-5D-4B-01-22        10 Gbps
vEthernet (DockerNAT)     Hyper-V Virtual Ethernet Adapter             20 Disconnected 00-15-5D-4B-01-08        10 Gbps


PS C:\WINDOWS\system32> $vmNetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
PS C:\WINDOWS\system32> Get-NetAdapter "vEthernet (DockerNAT)" | ? { $_.DeviceID -ne $vmNetAdapter.DeviceID } | DisableNetAdapter -Confirm:$False -PassThru | Rename-NetAdapter -NewName "OLD"

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
OLD                       Hyper-V Virtual Ethernet Adapter             20 Disabled     00-15-5D-4B-01-08        10 Gbps


PS C:\WINDOWS\system32> Get-NetAdapter "vEthernet (DockerNAT)"

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
vEthernet (DockerNAT)     Hyper-V Virtual Ethernet Adapter #2          42 Up           00-15-5D-4B-01-22        10 Gbps


PS C:\WINDOWS\system32> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world

c04b14da8d14: Pull complete
Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9
Status: Downloaded newer image for hello-world:latest

Hello from Docker!

As noted above, the suggested elevated powershell command(s) appear to be a valid workaround for me. It has also eliminated the log spam regarding TCP bind failing.

Hope this also works for @cramhead

@dgageot
Copy link
Member

dgageot commented Aug 2, 2016

\o/ Thanks @nivekastoreth, that's what I thought. Will be shipped in next Beta!

@glennsills
Copy link

@dgageot
I have similar symptoms except I do not have multiple adapters

See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
PS C:\WINDOWS\system32> Get-NetAdapter "vEthernet (DockerNAT)"

Name InterfaceDescription ifIndex Status MacAddress LinkSpeed


vEthernet (DockerNAT) Hyper-V Virtual Ethernet Adapter 28 Up 00-15-5D-63-01-05 10 Gbps

log-2016-08-02_09-30-18.txt

@cramhead
Copy link
Author

cramhead commented Aug 2, 2016

I had multiple adapters that I could not remove, even though I'm a local admin. I renamed them and disabled them.

I only have one DockerNAT and still have the problem.

PS C:\Users\mdentremont> Get-NetAdapter "vEthernet (DockerNAT)"

Name InterfaceDescription ifIndex Status MacAddress LinkSpeed


vEthernet (DockerNAT) Hyper-V Virtual Ethernet Adapter #4 15 Up 00-15-5D-01-83-19 10 Gbps

PS C:\Users\mdentremont> $vmNetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
Get-NetAdapter "vEthernet (DockerNAT)" | ? { $_.DeviceID -ne $vmNetAdapter.DeviceID } | Disable-NetAdapter -Confirm:$False -PassThru | Rename-NetAdapter -NewName "OLD"
Get-VMNetworkAdapter : Hyper-V was unable to find a virtual switch with name "DockerNAT".
At line:1 char:17

  • ... NetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
  •              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (DockerNAT:String) [Get-VMNetworkAdapter], VirtualizationException
    • FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVMNetworkAdapter

Disable-NetAdapter : Access is denied.
At line:2 char:89

  • ... ter.DeviceID } | Disable-NetAdapter -Confirm:$False -PassThru | Renam ...
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : PermissionDenied: (MSFT_NetAdapter...tochannel.net"):ROOT/StandardCimv2/MSFT_NetAdapter) [Dis
      able-NetAdapter], CimException
    • FullyQualifiedErrorId : Windows System Error 5,Disable-NetAdapter

@harryo
Copy link

harryo commented Aug 3, 2016

I have the same problem: Network timed out while trying to ....

A diagnostic was uploaded with id: 3032F0A7-2367-4488-BCF1-C23EB0A3F2D8/2016-08-03_01-54-04
Windows 10 Pro, only one adapter shown after Get-NetAdapter "vEthernet (DockerNAT)"

I tried already fixed DNS, uninstall/remove Wifi (only ethernet)/re-install, but still the same problem.

This is on my desktop; it works well on my laptop, on the same network.

@dgageot
Copy link
Member

dgageot commented Aug 3, 2016

@cramhead Can you make sure to run the commands in an elevated Powershell? Being a local admin is not enough I'm afraid.

@cramhead
Copy link
Author

cramhead commented Aug 3, 2016

@dgageot Thanks.
Renaming worked well. Is there a way to actually remove them.
I've tested Docker version 1.12.0, build 8eab29e, experimental and the hello-world was downloaded and run with no errors or warnings.
I would think this one closed.
Thanks so much for all your effort.

@cramhead cramhead closed this as completed Aug 3, 2016
@rn
Copy link
Contributor

rn commented Aug 4, 2016

@cramhead We haven't found a way to remove the adapters via PS, but you can remove them manually via the devmgmt.msc (aka Device Manager). You should see them as disabled Hyper-V Virtual Ethernet Adapter under the Network Adapter section. Righ-click and select uninstall should remove the adapter.

@cramhead
Copy link
Author

cramhead commented Aug 4, 2016

That's awesome. Thanks. I had tried to remove them via "Network
Connections", but that option was grayed.

On Thu, Aug 4, 2016 at 2:13 AM, Rolf Neugebauer notifications@github.com
wrote:

@cramhead https://github.com/cramhead We haven't found a way to remove
the adapters via PS, but you can remove them manually via the devmgmt.msc
(aka Device Manager). You should see them as disabled Hyper-V Virtual
Ethernet Adapter under the Network Adapter section. Righ-click and select
uninstall should remove the adapter.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#16 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAXj8xGlkJ6oEE7mBTrDB57jZhBOorltks5qca1AgaJpZM4JZ-GZ
.

@rn
Copy link
Contributor

rn commented Aug 4, 2016

yes, the network connection removal somehow doesn't work but devmgmt.msc does. The adapters shouldn't be there in the first place but we haven't been able to reliably reproduce it, though many users have them. So it's hard to discuss this with the Windows team.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants