microsoft / Windows-Containers

Welcome to our Windows Containers GitHub community! Ask questions, report bugs, and suggest features -- let's work together.
MIT License
408 stars 63 forks source link

Can't start any two docker-compose environments after update to Windows 20H2 #140

Open stephen-turner opened 3 years ago

stephen-turner commented 3 years ago

This was originally filed by user @marcusschroeder as docker/for-win#9999, but as it can be reliably reproduced on Windows 2010 (maybe 2004?) but not 1903, and as it only happens with Windows containers, we believe that it is a bug in the windows container code.

Original report:

Expected behavior On my computer I use a couple of docker-compose environments with windows containers in parallel. Before the windows update to 2004 or 20H2 it was no problem to start several environments with docker-compose up either manually or programmatically. It didn't matter if it was the same env with a different name or a completely different one.

Actual behavior Now, when starting any two docker compose environments, the second one gets stuck in start up until the first is stopped.

Information Is it reproducible? Yes, even on another computer. Is the problem new? Yes, it appeared after windows update 1903 to 20H2 Did the problem appear with an update? Yes Windows Version: Windows 10 Pro 20H2 Docker Desktop Version: 2.5.0.1 / 2.4.0.0 / 2.3.0.4 / 2.5.1.0 (experimental) / 3.0.0.0

The problem appeared after a Windows update from 1903 to 2004 or 20H2 respectively.

I have tried:

different Docker Desktop versions (see above) to no avail. WSL2 and LCOW

Steps to reproduce the behavior Use the following docker-compose.yml:


version: "2.4"

services: service_a: image: mcr.microsoft.com/windows/servercore/iis ports:

My colleague @StefanScherer has reproduced it without docker compose, but with a second nat network as follows:

$ docker network create -d nat first
10851710aef0c9645393c78f5480cc9d8c2309b079e4d8d82f70c9c6f1ee064f
$ docker run -d --network first -p 8004:80 mcr.microsoft.com/windows/servercore/iis
e89d12002a50b22b3628ddaca1ac06e4b34728ea803c7d5250d84721ddf993bf
$ docker run -d --network first -p 8005:80 mcr.microsoft.com/windows/servercore/iis
93adddb1f6213d21d0b8138b3fd47784938c238fa75256c31f7291c8713c57aa

$ docker network create -d nat second
e30d9c556d386408137db45222dc47d989e4c0d49a7f3a051f56ee93fa18c912
$ docker run -d --network second -p 8006:80 mcr.microsoft.com/windows/servercore/iis
f05233268a2e826f79f323659bf1e3a15333cd5d440117e053ccf04ceaf1a2c8
$ docker run -d --network second -p 8007:80 mcr.microsoft.com/windows/servercore/iis
3ea1546125d05b655e89913b5dd6677e3aa58d2e2d6b4f0fe93b1ff091ebb08e

The Docker Cli of the last container does not return to the shell prompt, and in Docker Dashboard the fourth container is in CREATED state. When I kill one of the first containers (e89d12) then the Docker Cli shows this error message

docker: Error response from daemon: failed to create endpoint serene_bhabha on network second: failed during hnsCallRawResponse: hnsCall failed in Win32: The specified port already exists. (0x803b0013).

The Port 8007 was not used before.

vrapolinario commented 3 years ago

I'll get this issue assigned to the proper team soon.

ghost commented 3 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. , please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @vrapolinario, please provide an update or close this issue.

fady-azmy-msft commented 2 years ago

Sorry for the delay @stephen-turner, is this still an issue you're facing?

stephen-turner commented 2 years ago

Thanks for reaching out. I assume it's still present unless some effort has been made to fix it, but I'm not actually the original reporter, I just transferred it from https://github.com/docker/for-win/issues/9999. The OR is @marcusschroeder.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @vrapolinario, please provide an update or close this issue.

ghost commented 2 years ago

This issue has been open for 30 days with no updates. @vrapolinario, please provide an update or close this issue.

vrapolinario commented 2 years ago

I don't know what the status of this is since I moved teams. Changed the assignment to @fady-azmy-msft.

ghost commented 1 year ago

This issue has been open for 30 days with no updates. @fady-azmy-msft, please provide an update or close this issue.

ghost commented 1 year ago

This issue has been open for 30 days with no updates. @fady-azmy-msft, please provide an update or close this issue.

fady-azmy-msft commented 1 year ago

Apologies for the radio silence. We have been able to reproduce the issue, and are looking into this. I've also created an internal ticket (41698313) to track this internally.

ghost commented 1 year ago

This issue has been open for 30 days with no updates. @fady-azmy-msft, please provide an update or close this issue.

logivity commented 1 year ago

Is there going to be update on this?

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. no assignees, please provide an update or close this issue.

fady-azmy-msft commented 1 year ago

@MikeZappa87 any updates on this?

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

ntrappe-msft commented 1 year ago

The team working on this has indicated that they're aware of the problem but have had to prioritize other tasks first. We'll update when we can.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 11 months ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

ntrappe-msft commented 10 months ago

Good news coming soon 🎉

microsoft-github-policy-service[bot] commented 9 months ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

jag-eagle-technology commented 9 months ago

@ntrappe-msft super excited to hear that good news - any updates? We're keen to get this resolved as it's a blocker for our current CI/CD process & for the clients using our compose orchestrated software.

ntrappe-msft commented 9 months ago

Hi, I totally understand how important this is to fix asap. @MikeZappa87 do you have any updates? You know more about the status of this Issue than I do.

microsoft-github-policy-service[bot] commented 8 months ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

ezw21 commented 7 months ago

I'm also very keen to get this fixed. Has there been any progress - this is pretty core functionality.

microsoft-github-policy-service[bot] commented 6 months ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

microsoft-github-policy-service[bot] commented 5 months ago

This issue has been open for 30 days with no updates. @MikeZappa87, please provide an update or close this issue.

ntrappe-msft commented 5 months ago

Reassigning Issue to another dev.

microsoft-github-policy-service[bot] commented 3 months ago

This issue has been open for 30 days with no updates. @grcusanz, @adrianm-msft, please provide an update or close this issue.

sikhness commented 3 months ago

Good news coming soon 🎉

@ntrappe-msft, has there been any progress on this? It's been over half a year since "good news" was supposedly coming soon.

adrianm-msft commented 3 months ago

@sikhness, we're actively working on this. It’s taking a bit longer than expected, will post any updates here.

sikhness commented 3 months ago

Thanks @adrianm-msft, we're eagerly awaiting news! Do you have any workarounds in the meantime as this feature is pretty fundamental.

adrianm-msft commented 3 months ago

@sikhness, it looks like rolling back to windows 1903 temporarily fixes the issue until a windows update is applied again.

sikhness commented 2 months ago

Thanks @adrianm-msft, this won't be possible in my environment as my host is running Windows Server 2022 and I don't think it can rollback to a version that old. Eagerly awaiting the fix for this.

Jens-G commented 2 months ago

Using 2019 also helps. Not that I would recommend that, but indeed it still works there. Being hit by it myself after moving my environment to Server 2022, so a fix would really be appreciated.

marceliwac commented 2 months ago

I would love to see this issue resolved as well. I've spent countless hours trying to debug the application logic and the docker setup on my Windows Server 2022 machine only to find that the problem is in fact the above.

For those looking for a temporary workaround (and I appreciate that this won't apply to more complex setups!), simplifying the networking stack in the compose file resolved all my issues with the containers sporadically hanging during startup, having to restart the docker service and in some cases the entire system etc. Specifically, I removed the custom networks and customised the default one instead to prevent having multiple networks (default network was being created automatically). I'm only mentioning this here to aid those who also struggled with the same problem in a hope it gets more visibility online.