docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 288 forks source link

Unable to recreate a NAT network once one has been created then deleted #4354

Open ggirard07 opened 5 years ago

ggirard07 commented 5 years ago

Expected behavior

When running in Windows container mode, I should be able to create/delete a NAT network more than once.

Actual behavior

Once I have create a NAT network then deleted it, I cannot create any NAT network anymore until the machine is restarted.

C:\> docker network create --driver nat my-net
b1d6dc8e34b979996d178a80878954e8788f911bb690ec56a09a86874db567b4
C:\> docker network rm my-net
my-net
C:\> docker network create --driver nat my-net
Error response from daemon: hnsCall failed in Win32: The system cannot find the file specified. (0x2)

Information

Steps to reproduce the behavior

  1. Create a new NAT network docker network create --driver nat my-net
  2. Delete the previous network docker network rm my-net
  3. Create a new NAT network docker network create --driver nat my-net-bis

Current workaround is to restart the host machine. Restarting the daemon or resetting to factory settings does not fix the issue.

This behavior is a real pain as any docker-compose up creates such a network by default, then delete it on next docker-compose down or docker-compose up, which creates the describe issue right away.

djs55 commented 5 years ago

I couldn't reproduce this with

Since the error comes from the Docker engine interface to the Microsoft Host Networking Service (HNS) I think this should probably be a ticket on https://github.com/moby/moby. WDYT @thaJeztah ?

ggirard07 commented 5 years ago

Just tested on a Windows 10 Pro 1809 (17763.615) and I can't reproduce either.

ggirard07 commented 5 years ago

@djs55 @thaJeztah Should I open a new issue on https://github.com/moby/moby as suggested?

normanlmfung commented 5 years ago

I'm using Windows 10 Pro OS Version 10.0.17763 N/A Build 17763

I have the same issue.

docker-robott commented 4 years ago

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

ggirard07 commented 4 years ago

/remove-lifecycle stale

I can still reproduce the exact same issue on Windows 10 Pro 1903 (OS Build 18362.175) and Docker Desktop 2.1.0.5 (40693).

ggirard07 commented 4 years ago

/lifecycle frozen

sirNugg3ts commented 6 months ago

having the same issue, passed 4 years its still the same?

smartbrapp commented 4 months ago

Mesmo problema em docker no windows 11