Closed gregpakes closed 6 years ago
I managed to solve this by:
Seems like a nuclear option though!
You can also try to reset to factory defaults (in d4w settings / diagnostics) or even try Microsoft's own HNS nuke script: https://github.com/Microsoft/Virtualization-Documentation/tree/live/windows-server-container-tools/CleanupContainerHostNetworking
@simonferquel I thought I detailed this in the original post, but I didn't - apologies.
I tried both of those solutions. Neither worked.
I have been experiencing this on Windows 2016 regularly with deployments from a CI process: https://github.com/docker/compose/issues/4521
I have tried all the recommendations listed above. In a compose deployment I regularly get a service fails with something in the HNS.
I was experiencing the same issue with both stable release and edge release on Windows 10 (not the Creator Update). Because it's Unspecified Error, here is nothing interesting in the log. I got the error when trying to run microsoft/ii:windowsservercore image and microsoft/sqlserver-windows:latest images. With refresh reboot, I can run iis image once and only once, but never had any luck with the sql image. I was using normal run command. Didn't try compose. After the run command and getting the error, I found the containers were created.
@celcat I think your issue is different. Pre-Creators Update, windows could only have 1 nat network. If you tried to create another it failed.
Creators update allows more than 1
Hi @gregpakes no, I didn't try to create another network. I only used the default nat network.
Just finished my experiment of doing everything from slate, i.e. uninstalled the docker, turnned off the Hyper-V and Container features, deleted the docker folders everywhere, and then put back everything again. Still no luck with both iis and sql server images. Got the error as long as I put -p or -P option on the run command.
@CELCAT are you able to get the creators update? I think it might help.
Hi @gregpakes sorry for the late reply. I'm afraid I'm not able to do it. I'm using Surface Pro 3 which may have some issue with Creator's update and most importantly our company IT admin doesn't want us to upgrade yet.
Hi @gregpakes I managed to install the Creators' Update and the issue seems gone. But before the update, I wiped off everything including docker, container support and hyper-v, not sure which part helped.
[UPDATE] Managed to launch the mssql-server-windows-developer container and connected to it from host via Management Studio. But as soon as I attempted to create a new database, I got BSOD! But this new issue is probably off-topic here.
script worked for me by calling with both -cleanup -ForceDeleteAllSwitches and restart. I only needed to reassign network adapters in my Hyper-V virtual machines, because of the deleted adapters.
In my case I was trying to assign a new container using the same external ports as another container. Once I made my exposed ports different from the others everything started working.
I have a similar problem here. SCENARIO: I have a Windows Server 2016 with container and try to host a Windows Server Core with an legacy COM+ application. COM+ is a RPC based service and uses the port range 49152-65535 to communicate. So I run: docker run -d -p 49152-65535:49152-65535 MyCOMPlusContainer and get the error: _Error response from daemon: failed to create endpoint musingyalow on network nat: HNS failed with error : Unspecified error. If I run the same, but only with a few ports like 49152-50152 it run, but I cannot access the component inside the container.
I have this issue with docker 17.06.2-ce.
I have tried to uninstall docker / hyper-v and containers but no luck fixing this.
Network just seems broken on my pc and i don't know how to fix, without reinstalling windows.
Any suggestions?
What I have done was to create a new network interface:
docker network create -d transparent --gateway 192.168.1.1 --subnet=192.168.1.0/28 -o com.docker.network.windowsshim.interface="Ethernet" MyNetwork
Above assumes network of the type 192.168.1.0 with a net mask of 255.255.255.0
Then when creating your container point to this network:
docker run -d --network MyNetwork --mac-address="00:15:5d:d9:e4:43" --restart=always --name myNameContainer myrepository/myApp:dev
It worked for me.
I assume your host computer can actually get to the network, and only your containers cannot.
I managed to get this working by installing and uninstalling a few times and making sure windows is up-to-date lol.
Though I thought I did read somewhere that the you can have more then one NAT network with the Windows 10 Creators Update.
Any seems to be working now :-)
@andyliddle you can have multiple nat networks with Creators Update. However as far as I know this is not possible on windows server 2016 yet so a little self-defeating for a production scenario where you want this isolation. I believe overlay networks will be the way to go but last time i tested a few things out I was having trouble with the routing mesh support :(
In my case, removing Windows Security Update KB4074590 from my Win 2016 server resolved the issue.
update: Another Security release from Microsoft hit this morning and causes the same problem KB4041691. Uninstalling this update also fixes the issue on Win 2016
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
It looks like that it is a port conflict issue(so probably you need to use some other port instead of 1433 which is default for MS SQL Server), here is a good description from @natemcmaster
I have reset my docker as default factory and it worked.
In my case docker network prune
helped.
In my case this was a SQL Server container and the error was because the port I specified was already taken by a previous SQL installation in the host, changing the port fixed my issue
Port conflict was exactly what it was for me. I was running docker on Win2016 with IIS installed and running on the host. Trying to run a container with -p 80:80 was failing since port 80 in use by the host for IIS. Stopping IIS solved it.
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
Failed to create endpoint on network nat: Unspecified error
Expected behavior
When I run the following command
I would expect the container to be created.
Actual behavior
I get the following:
I have tried resetting docker for windows, but it still persists.
I believe the issue was caused by a BSOD on the first load of the same container.
Information
Debug-ContainerHost.ps1 output:
Steps to reproduce the behavior