-
Notifications
You must be signed in to change notification settings - Fork 287
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
Clean Docker-preview install on Server 1709 does not correctly configure NAT #1366
Comments
I could experience similar problems with a new 1709 machine and the latest docker preview edition. |
Has anyone got this working? I've been trying for quite some time to get overlay mesh networking functional on Server 1709 with no success whatsoever. |
I have it working with a slightly different premise. I installed 1709 directly into a spare laptop rather than running it as a VM in order to avoid any need for nested virtualization. Otherwise if all you want is to use the ingress routing mesh to work I found that it was not necessary to set the network when creating the service. I used the following command
This allowed me to access the container on the exposed port of either of my 2 nodes. When testing, make sure to clear cache after every WebRequest Invoke and you will see that it is pulling a different container across all available containers on multiple nodes. In my case my image was an aspnetcore2.0 webapi with a method to display the "machine name" in which it will always display the 'containername -> hostname'. Because of this I can see that the routing mesh is working as intended. Keep in mind I am connecting to these containers from outside the swarm using :8080 and have not been able to test from within the swarm using the hostname/containername. |
I'm running my development machine with Win 10 Enterprise (1709) and experiencing the same issues. Using either Docker 7.12.0-ce-win47 or Docker 18.02.0-c3rc2. Upon starting a service every node logs: |
Same error HNS failed with error : An adapter was not found. Server: |
This seems to be working for me with 17.10.0-ee-preview-3 |
I'm having the same NAT issues on 17.12.0-ce-win47 on Windows 10 1709 and a fresh install of Docker did not resolve it. |
hello @gh2k, i stumbled across your forum post https://forums.docker.com/t/containers-cant-ping-over-overlay-network-on-windows/40199 and #1334, while desperately trying to determine why the docker overlay network does not work in a cross platform swarm setup. Is the NAT issue you are addressing here the source of these problems? |
Hi @kdrblkbs - It sounds like you've been following the same path as me. I've spent weeks pulling my hair out about this stuff, assuming that I've Just Not Been Getting It. - All the instructions suggest it should Just Work, but I've not found any examples/walkthroughs of someone setting this up. Nevertheless, I've had some progress... I've spent so long looking at this that I've lost touch with exactly what's worked and what hasn't. Currently I know the following:
Given the above, I have a Vagrant environment running Windows 1709 and Linux with overlay networking mostly working. Containers can access each other over the overlay network via vip, and ingress routing works. However, Windows containers can't access the internet unless I manually add them to the 'nat' network, and I can't do this if they're running as services because the 'nat' network doesn't have swarm scope. I've worked around this for my environment, so that it's OK for my Windows containers don't have to have access to the internet... But it's an ugly hack. In case it helps, I'm running my Windows VM based on the 1709_docker build in https://github.com/StefanScherer/packer-windows, and my I'm hoping that the upcoming Windows 1803 will make this process simpler... ¯\_(ツ)_/¯ |
thanks a lot for sharing your findings @gh2k |
For me with To me it looks like Docker on Windows Server does not support multiple interfaces (internet and intranet) at the moment. Update: It seems like it is possible to bind networks to specific interfaces, please see the following link for a possible solutions which worked for my case: https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-networking#bind-a-network-to-a-specific-network-interface |
This issue tracker is for the Docker for Windows application, which runs on Windows 10. So, I'm closing this issue. To get help with Docker on Windows Server please see http://success.docker.com/article/where-to-get-help-with-windows. |
Closed issues are locked after 30 days of inactivity. 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. |
Expected behavior
Installing Docker on Windows Server 1709 should install a Windows NAT mapping.
Actual behavior
Installing Docker on Windows Server 1709 does not create a Windows NAT mapping.
Information
On a fresh Server 1709 VM I installed: Windows Updates, Hyper-V and Docker preview.
After this, running
Debug-Containerhost.ps1
reports that Windows NAT should exist, and doesn't:There is a NAT network created by default:
Further to this, swarm ingress routing does not work. For example, after running the commands:
should result in a service listening on the server's LAN IP on port 8080. It doesn't.
Additionally: As described by @kevinbosman in this comment: #1255 (comment) - Attempting to add the NAT mapping manually results in a 'duplicate name exists' error
Steps to reproduce the behavior
Add-WindowsFeature Hyper-V -IncludeManagementTools -Restart
Debug-Containerhost.ps1
You should see the error:
The text was updated successfully, but these errors were encountered: