docker / for-win

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

Unable to use networking after initial Docker start, restart of Docker fixes everything. #2212

Open mklinke opened 6 years ago

mklinke commented 6 years ago

Expected behavior

I can use Docker and Docker Compose after booting Windows and as soon as Docker says it's running.

Actual behavior

I can't use Docker or Docker Compose with anything related to networking, like pulling an image or launching a container with an exposed port etc. However, a Docker restart solves any issue seen before. Same images, same compose files etc.

Example error message when using docker-compose ... up (beginning of message is truncated):

...
.0.0:80:tcp:172.18.0.21:80: input/output error

ERROR: for proxy  Cannot start service proxy: driver failed programming external connectivity on endpoint xavo-proxy (5fbfcf4608033e8b2a7f60ae09d74dd9f5b3904b41f3cdc371ce8b903e49a8e6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:80:tcp:172.18.0.21:80: input/output error
ERROR: Encountered errors while bringing up the project.

Information

Steps to reproduce the behavior

  1. Boot Windows, have Docker start automatically (via regular options provided by Docker)
  2. Try to use Docker with any network related functionality
ghost commented 6 years ago

I have the same issue with the MobyLinuxVM created by Docker for Windows. I do not have the issue with a Boot2Docker virtual machine which I created by following the instructions here: https://docs.docker.com/machine/drivers/hyper-v.

The VMs use different images (the md5sum's are different):

The VMs use differently configured virtual switches:

I can try to setup a docker machine with the docker-for-win.iso image if this will narrow down the root cause.

A downside of this workaround is that the VM does not bind to localhost, but it has its own dynamic IP which I have to figure out by running docker-machine ip with admin privileges. Accessing Docker via localhost is much more convenient. Therefore I tried to setup the Boot2Docker virtual switch with Connection type Internal network, but for reasons which I do not understand, I could not access the Boot2Docker VM via localhost.

samsonluk commented 6 years ago

Cannot access network within docker container as well, only a restart can restore everything.

docker version Client: Version: 18.03.1-ce API version: 1.37 Go version: go1.9.5 Git commit: 9ee9f40 Built: Thu Apr 26 07:12:48 2018 OS/Arch: windows/amd64 Experimental: false Orchestrator: swarm

Server: Engine: Version: 18.03.1-ce API version: 1.37 (minimum version 1.12) Go version: go1.9.5 Git commit: 9ee9f40 Built: Thu Apr 26 07:22:38 2018 OS/Arch: linux/amd64 Experimental: false

docker-robott commented 6 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

ghost commented 6 years ago

Disabling fastboot is a workaround (see #1967).

Related: #573 Related: #1038 Related: #1752 Related: #2722

graham73may commented 5 years ago

/remove-lifecycle stale

Still experiencing this issue, all up to date.

docker-robott commented 5 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

graham73may commented 5 years ago

/remove-lifecycle stale

This is still a big problem.

/lifecycle frozen

OT: Am I allowed to mark things as not stale / frozen?