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

Docker won't start containers after win 10 shutdown and power up. #1038

Open
relnah opened this Issue Aug 25, 2017 · 67 comments

Comments

Projects
None yet
@relnah

relnah commented Aug 25, 2017

Expected behavior

After shuting down win 10 normally and with a working docker running, docker should be running as normal after powering up win 10.

Actual behavior

Starting containers fails with: Error response from daemon: Cannot restart container my_container: driver failed programming external connectivity on endpoint my_container (782f444833c57027050a58f8c0302473f76d9029a50944960d13c6ed940a4392): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:49161:tcp:172.17.0.2:1521: input/output error

docker compose up hangs.

Restart of docker engine will make it work again.

Information

Diagnostic ID 18D5608F-3086-460D-BD15-84F84F2C55D6/2017-08-25_08-09-32

Docker info:
Version 17.06.1-ce-win24 (13025)
Channel: stable
54dc09c

Win 10 info:
Edition: Windows 10 Enterprise x64
Version: 1703
OS Build: 15063.540
CPU: Inter Core i7-6600U 2.6GHz
RAM: 16 GB

Steps to reproduce the behavior

  1. Start windows. Start docker and check "Start docker when you login".
  2. Confirm docker is working as normal.
  3. Do normal shutdown of windows.
  4. Start up windows.
  5. Confirm that docker has started.
  6. Try starting a container. This fails with above mentioned problems.
  7. Restart Docker. Starting containers work again.
@RayDeCampo

This comment has been minimized.

RayDeCampo commented Aug 30, 2017

I have the same issue although I have observed it happening when just logging out and logging back into my OS account. A restart of the docker service is the work-around. I am on Windows 10 Pro version 10.0.15063.502.

@relnah

This comment has been minimized.

relnah commented Oct 26, 2017

Still having this issue after latest docker and latest Win 10. Running linux containers to keep it consistent within our organization.
Disgnostic id: 18D5608F-3086-460D-BD15-84F84F2C55D6/2017-10-26_08-42-13
Docker version:
Version 17.09.0-ce-win33 (13620)
Channel: stable
8c56a3b

Win version:
Win 10 info:
Edition: Windows 10 Enterprise x64
Version: 1709
OS Build: 16299.19
CPU: Inter Core i7-6600U 2.6GHz
RAM: 16 GB

@shillner

This comment has been minimized.

shillner commented Nov 30, 2017

Hi, having the same issue on my machine. Settings are nearly identical to the ones of @relnah.
After shutdown or logout with running Docker for Windows the next docker startup is pretty fast but containers won't start. Only restarting docker helps at this point.

@DirtyJerz

This comment has been minimized.

DirtyJerz commented Nov 30, 2017

It seems the containers are still running ($docker ps) but the ports are no longer exposed (netstat -an). This is kinda frustrating and makes a multi-user or consecutive-session scenario inoperative.

@relnah

This comment has been minimized.

relnah commented Jan 9, 2018

Same issue after latest update:
Version 17.09.1-ce-win42 (14687)
Channel: stable
3176a6a

diag id:
18D5608F-3086-460D-BD15-84F84F2C55D6/2018-01-09_07-41-17

@relnah

This comment has been minimized.

relnah commented Jan 18, 2018

And still here:
Version 17.12.0-ce-win47 (15139)
Channel: stable
9c692cd

Error response from daemon: Cannot restart container xxxxx: driver failed programming external connectivity on endpoint xxxxx (bb96658514789875b9aabda58ee4312d26cabab216c516f34bcf34075b1db9a0): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:49161:tcp:172.17.0.2:1521: input/output error

Diag:
18D5608F-3086-460D-BD15-84F84F2C55D6/2018-01-18_07-58-02

@kbeaskoetxea

This comment has been minimized.

kbeaskoetxea commented Jan 24, 2018

Exactly the same issue here, I have to restart it whenever I shut down - power up my PC.

Docker info:
Version 17.12.0-ce-win47 (15139)
Channel: stable
9c692cd

Win 10 info:
Edition: Windows 10 Pro
Version: 1709
OS Build: 16299.192
CPU: Inter Core i5-7200U 2.5GHz
RAM: 12 GB

@fiture

This comment has been minimized.

fiture commented Feb 1, 2018

Same issue.

Error response from daemon: Cannot restart container xxx: driver failed programming external connectivity on endpoint lite (b7974e1da9cef2c73e75dcb7f6452cb753675e1c63feab82a4ccb433a5c337fe): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8000:tcp:172.17.0.2:8000: input/output error
@smiron

This comment has been minimized.

smiron commented Feb 9, 2018

6 months later and I still have this issue. Hope they go bankrupt FFS

Update: 6 months later and I have 7 down emojis. Sooo scarry. Thanks guys. You made my day 🥇

@jenspettersson

This comment has been minimized.

jenspettersson commented Feb 12, 2018

Same issue here. Shutting down Windows 10 with Docker For Windows running, but not set as "Start docker on login".

After restart I start Docker for Windows manually and my containers that should start automatically starts (a RabbitMQ container). However, it's not accessable and if I try to restart I get the same "driver failed programming..." error... I have to stop Docker for Windows and start it again.

@dongshengYoung

This comment has been minimized.

dongshengYoung commented Feb 13, 2018

when i sign out docker ,then sign in, the container can't

just quit docker and restart docker ,the container goes well.

my OS is win10

maybe restarting docke is a helpful way to solve problems of windows

@Diedzz

This comment has been minimized.

Diedzz commented Feb 16, 2018

same here, always have to restart docker after loging in to Win.

@LeslieMurphy

This comment has been minimized.

LeslieMurphy commented Feb 16, 2018

Is this a Docker issue, or a Hyper-V issue? Not sure.

See https://forums.docker.com/t/overlay-network-broken-after-resuming-from-sleep/37376

@jbuschke

This comment has been minimized.

jbuschke commented Feb 22, 2018

same problem here

@Christowiak

This comment has been minimized.

Christowiak commented Mar 1, 2018

same problem here

1 similar comment
@fcavaco

This comment has been minimized.

fcavaco commented Mar 1, 2018

same problem here

@ramzgt

This comment has been minimized.

ramzgt commented Mar 5, 2018

I have the same issue as well. Frustrating.

@tkallevik

This comment has been minimized.

tkallevik commented Mar 5, 2018

I also have the same problem.

@Christowiak

This comment has been minimized.

Christowiak commented Mar 5, 2018

i have found a solution on a other thread.

#573

The problem relies on the hybrid shutdown mode from the lastest win 10 updates. After disable it under energy options, the problem is solved for me.

@kkajdd

This comment has been minimized.

kkajdd commented Mar 8, 2018

restart of the docker after win10 boot up worked for me.

@fiture

This comment has been minimized.

fiture commented Mar 15, 2018

As @Christowiak say, Turn off fast startup works for me.
Uncheck Turn on fast startup and save. enjoy!
Control Panel > Hardware and Sound > Power Options > System Settings
windows 10 fast startup

@quayal

This comment has been minimized.

quayal commented Mar 21, 2018

I have the same issue, only that I can't see any containers; docker ps returns nothing

@cchance27

This comment has been minimized.

cchance27 commented Mar 21, 2018

docker ps -a your containers are probably stopped still you''ll need to start them unless you set them to auto-restart

@kbeaskoetxea

This comment has been minimized.

kbeaskoetxea commented Mar 21, 2018

Yep. As @Christowiak said, I turn off Windows' fast startup and it goes fine.

@relnah

This comment has been minimized.

relnah commented Mar 21, 2018

Turning off OS features on my computer just to get Docker to work normally isn't really a soulution. A temporary workaround perhaps. So the issue is still valid.

@ruifigueira

This comment has been minimized.

ruifigueira commented Mar 24, 2018

I couldn't find any UI to disable the hybrid shutdown mode as @Christowiak pointed out, so I went directly to regedit and created a Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableAutomaticRestartSignOn key (DWORD type) with value 1 and it seems to be working fine now.

More details on that property can be found in Winlogon Automatic Restart Sign-On (ARSO)
.

@saspeed

This comment has been minimized.

saspeed commented Aug 24, 2018

cheer up, tomorrow we celebrate the first anniversary of @relnah opening this issue^^

@sriharisahu

This comment has been minimized.

sriharisahu commented Aug 27, 2018

Affects me too.

docker version:

Client:
 Version:           18.06.0-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        0ffa825
 Built:             Wed Jul 18 19:05:28 2018
 OS/Arch:           windows/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.0-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       0ffa825
  Built:            Wed Jul 18 19:13:46 2018
  OS/Arch:          linux/amd64
  Experimental:     false

system info:

OS Name:                   Microsoft Windows 10 Enterprise
OS Version:                10.0.15063 N/A Build 15063
@morales2k

This comment has been minimized.

morales2k commented Aug 27, 2018

This hadn't happened to me so far... but it did bit me today.

Same problem as reported above by many other users.
I'm running on Windows 10 Pro: 10.0.17134 Build 17134
Docker version: 18.06.0-ce, build 0ffa825

As others have stated, restarting the docker service through the gui was a pretty fast fix of this issue, however it made me waste like 2 hours searching around until I finally stumbled upon this github page. lol Good luck with this...

@znmeb

This comment has been minimized.

znmeb commented Aug 27, 2018

If you search this repo's issues for driver failed programming external connectivity on endpoint you will find 24 issues, 11 open and 13 closed. As far as I'm concerned Docker Compose on Windows 10 Pro is not a supportable product.

For small-scale desktop operations, I suspect PowerShell scripting is a better option than wrestling with a broken Docker Compose. For full-strength DevOps development, now that Docker for Windows ships Kubernetes, I'm planning to migrate my workflow to Kubernetes.

@RichardBruskiewich

This comment has been minimized.

RichardBruskiewich commented Sep 11, 2018

I encountered the same problem on my Windows 10 workstation but couldn't find the "Fast Startup" setting. Brainstorming a bit, I thought I'd check the Docker for Windows service startup configuration. The service was set to "Automatic" but I noticed that "Automatic (Delayed Start, see )" was an option, so I chose that instead. That setting delays the startup for about 2 minutes or so after the last regular automatic service is started during boot up. This setting seemed to fix the problem so I surmise that once Windows 10 is properly initialized, the Docker for Windows service can truly start normally.

@IanIsFluent

This comment has been minimized.

IanIsFluent commented Sep 12, 2018

I encountered the same problem on my Windows 10 workstation but couldn't find the "Fast Startup" setting. Brainstorming a bit, I thought I'd check the Docker for Windows service startup configuration. The service was set to "Automatic" but I noticed that "Automatic (Delayed Start, see )" was an option, so I chose that instead. That setting delays the startup for about 2 minutes or so after the last regular automatic service is started during boot up. This setting seemed to fix the problem so I surmise that once Windows 10 is properly initialized, the Docker for Windows service can truly start normally.

Tried this first - but no effect. Trying switching off fast startup now.

@jasonbivins

This comment has been minimized.

jasonbivins commented Sep 12, 2018

We have made some recent changes to the Hyper-V detection on startup - and have seen issues in the past where Hyper-V wasn't starting up with Windows. Please make sure your Hyper-V is set to auto-start.

bcdedit /set hypervisorlaunchtype auto

@IanIsFluent

This comment has been minimized.

IanIsFluent commented Sep 12, 2018

We have made some recent changes to the Hyper-V detection on startup - and have seen issues in the past where Hyper-V wasn't starting up with Windows. Please make sure your Hyper-V is set to auto-start.

bcdedit /set hypervisorlaunchtype auto

Already was. Sorry.

@relnah

This comment has been minimized.

relnah commented Sep 13, 2018

@jasonbivins
This is what bcdedit reports as current settings:
hypervisorlaunchtype Auto

So it is already set and doesn't solve my issue I'm affraid.

@LindaLawton

This comment has been minimized.

LindaLawton commented Sep 13, 2018

Didnt help either.

C:\WINDOWS\system32>docker start f5
Error response from daemon: driver failed programming external connectivity on endpoint some-redis (23381a6591805e2b8d634c923c0cb97194c916bf18617ad6816972852879eec5): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.17.0.2:6379: input/output error
Error: failed to start containers: f5

@Pyroseza

This comment has been minimized.

Pyroseza commented Sep 17, 2018

Do they realise that this is basically everyone on Windows 10 with the problem?

Why does a docker-compose down or docker stop my_container not work???
Surely it should clean up after itself...

Restarting the host is not a correct answer.

@idurant

This comment has been minimized.

idurant commented Sep 19, 2018

Same issue here. I was attempting to docker run Jenkins when this happened. Looking at docker ps -a shows things are being created but can not run 😞

@basovic88

This comment has been minimized.

basovic88 commented Sep 27, 2018

I've got exactly the same issue here.

Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5432:tcp:172.17.0.2:5432: input/output error.

With:

  • Windows 10 Pro version 1803 build 17134.285
  • Docker version 18.06.1-ce, build e68fc7a

A restart of the docker service is the work around.

@stasgar

This comment has been minimized.

stasgar commented Oct 1, 2018

I think this moment should at least be mentioned in the official docker documentation, i only found a solution right in this issue report (restarting docker is the way to go).

@jasonwilliams

This comment has been minimized.

jasonwilliams commented Oct 9, 2018

Root Cause: #1967
Related: #1752
Related: #2722
Related: #573

Is anyone fixing this? There seem to be a few issues around the same problem?
I don't want to turn off fast startup

@andrei-ivanov

This comment has been minimized.

andrei-ivanov commented Oct 9, 2018

They are probably waiting for everyone to switch to Linux 😂

@znmeb

This comment has been minimized.

znmeb commented Oct 9, 2018

Sadly, I don't know the internals of everything, but here's what I suspect is happening.

When you shut Windows down, it sends a signal to all the processes that warns them to save their work and exit gracefully. If they don't do so, eventually Windows will time out and nuke the process. Since Docker for Windows is running as a Linux guest in Hyper-V, I'm assuming Hyper-V catches this signal and cleans up its own act.

But does it send a signal to the Moby Linux guest VM warning it of the impending shutdown? And does the Moby Linux guest catch the signal and clean up / exit gracefully?

@xenogew

This comment has been minimized.

xenogew commented Oct 16, 2018

Same Problem found w/ docker-compose

Expected behavior

  • all containers start again with created properly after containers stop -> computer restart

Actual behavior

  • the containers that have port binding defined throw error and won't start

Information

Diagnostic ID: 757E1038-9468-430D-A9F0-F885E0CCDC8B/20181016115627 (It might not has anything refer to problem because I do workaround method to make them run properly again)
`docker-compose up` -> `docker-compose stop` -> Docker shutdown -> Windows shutdown -> Windows startup -> Docker startup -> `docker-compose start` -> port bind containers ERROR
Host: Windows 10 Pro 64 bit version 1809 (10.0.17763.55)
Docker Community 18.06.1-ce-win73 (19507) channel stable b0f14f1
Docker Compose: 1.22.0

Steps to reproduce the behavior

1. `docker-compose up`
2. `docker-compose stop`
3. Docker shutdown
4. Windows shutdown
5. Windows startup
6. Docker startup
7. `docker-compose start`
8. port bind containers ERROR
@relnah

This comment has been minimized.

relnah commented Nov 20, 2018

Issue still active in latest release... disabling fast boot is not an option. Don't want to hurt the rest of my computer 'cause of docker.
Updated docker.
Started docker.
Running fine.
Windows shut down.
Windows startup
Docker says it's running but does not work.

Error response from daemon: Cannot restart container mycontainer: driver failed programming external connectivity on endpoint mycontainer (130bd48c6e88133f7089baf17b0c9cf207281078626e65106e492884362e8ce9): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:49161:tcp:172.17.0.2:1521: input/output error

Diag id: 18D5608F-3086-460D-BD15-84F84F2C55D6/20181120080028

Restart of docker still restores it to normal but is a real pain to have to do each day.

@relnah

This comment has been minimized.

relnah commented Nov 22, 2018

Bypassed IT-department and updated to latest Windows 10 Enterprise. Same issue :(
Edition: Windows 10 Enterprise
Version 1809
OS build 17763.134

Docker diag id: 18D5608F-3086-460D-BD15-84F84F2C55D6/20181122101449

@longhf

This comment has been minimized.

longhf commented Nov 23, 2018

This problem may caused by a new feature of win10, See the answer from biscuit314 in this thread [https://stackoverflow.com/questions/40668908/running-docker-for-windows-error-when-exposing-ports] Stop all running docker containers before shutdown your computer, this method help me solved this problem.

@Hans-kovit

This comment has been minimized.

Hans-kovit commented Dec 5, 2018

Experiencing the same problem ... Very dissapointing ... Upgraded my windows Home to Pro JUST so I could use Docker on my windows machine as well and not have to put my laptop on my desk, every time I work from home. Restarting will only work only 50% of the times, the other 50% it will report not being able to (re)start for not having enough memory (yeah right, 8Gb is not enough eh ?) ... Annoying as fook.

@LindaLawton

This comment has been minimized.

LindaLawton commented Dec 5, 2018

Putting all of your containers into a docker swarm seams to work. They start up fine after a reboot.

docker swarm init
docker network create --driver overlay mynetwork
docker service create --name elasticsearch --network mynetwork -p 9200:9200 -p 9300:9300 --mount type=bind,src=c:/mynetwork/elasticsearch,dst=/usr/share/elasticsearch/data docker.elastic.co/elasticsearch/elasticsearch:6.4.3
docker service create --name kibana --network mynetwork -e ELASTICSEARCH_URL=http://elasticsearch:9200 -e xpack.security.enabled=false -p 5601:5601 docker.elastic.co/kibana/kibana-oss:6.4.3
docker service create --name rabbit --network mynetwork --hostname my-rabbit -p 5672:5672 -p 8080:15672 rabbitmq:3-management
docker service create --name redis --network mynetwork -p 6379:6379 redis
docker service create --name mongo --network mynetwork --hostname my-mongo -p 27017:27017 --mount type=volume,src=mongodb,dst=/data/db mongo:3.6

tip: make sure to enable shared drives

@bvkeersop

This comment has been minimized.

bvkeersop commented Dec 7, 2018

Same problem here.
Restarting docker works but it's annoying to have to do this every time.

@jasonwilliams

This comment has been minimized.

jasonwilliams commented Dec 7, 2018

If you’re also affected by this or a comment is helpful can you +1 the comment?
The “me too” comments cause a lot of noise for everyone subscribed.

@sinanaltaii

This comment has been minimized.

sinanaltaii commented Dec 11, 2018

I have the same issue with Parallels Windows 10
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment