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

Error starting userland proxy: mkdir /port/tcp:0.0.0.0:80:tcp:172.17.0.2:5000: input/output error. #573

Open
signsmile opened this Issue Mar 12, 2017 · 159 comments

Comments

Projects
None yet
@signsmile
Copy link

signsmile commented Mar 12, 2017

Expected behavior

Actual behavior

Information

  • Diagnostic ID from "Diagnose & Feedback" in the menu.
  • a reproducible case if this is a bug, Dockerfiles FTW
  • page URL if this is a docs issue or the name of a man page
  • host distribution and version (Windows version, build number, etc)

Steps to reproduce the behavior

  1. ...
  2. ...
@friism

This comment has been minimized.

Copy link

friism commented Mar 15, 2017

Can you please add a diagnostic id and provide more details?

@Magdaflowne

This comment has been minimized.

Copy link

Magdaflowne commented Mar 22, 2017

Hello

ID : 9F12A71E-4AE6-47EC-8210-1ED7FD3BEFA3/2017-03-22_12-10-00

Using docker compose with "Ports" enable to access web server in localhost.

Example :
ERROR: for mssql Cannot start service mssql: driver failed programming external connectivity on endpoint serveurMsSQL (6ddab67975bf1feeae04902befbe6caf557e782859cfdf4a76e0a4fa47a251d2): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:1443
:tcp:172.18.0.3:1433: input/output error

OS : Windows 10 x64 Version 1607 / Build : 14393.693

EDIT 1 : Desactiving "Experimantal Features" (checked by default) solve my issue

@pf-curtis-mitchell

This comment has been minimized.

Copy link

pf-curtis-mitchell commented Mar 22, 2017

Same error message for me. Should I open a new ticket?
Just in case it's helpful here:
ID: 92AFBA65-1F89-4C80-8352-FE13334E71DC/2017-03-22_10-18-19
Version 17.03.0-ce-win1 (10296)
Channel: stable
e5a07a1
OS: Windows 10 Enterprise 10.0.14393 Build 14393

While doing further tests for this ticket, I made the following observation:
The failing command was a simple docker run command that has a port binding with the full ip.

For example

docker run -p 192.168.33.33:22:22 ...

The IP was incorrect. Once I made the correction, the command worked as expected.

I hope that helps.

@friism

This comment has been minimized.

Copy link

friism commented Mar 22, 2017

@Magdaflowne do you have the docker-compose file that you're trying to run?

@pf-curtis-mitchell no reason to open a new ticket, and happy to hear you got it working.

@WrRaThY

This comment has been minimized.

Copy link

WrRaThY commented Mar 22, 2017

I also get this problem
OS: Windows 10 Enterprise
virtualization: native hyper-v

does not matter if I use powershell or ubuntu shell, same result

all you have to do to reproduce the issue is:
docker run -p 8080:8080 hello-world
or any other port for that matter

@apupier

This comment has been minimized.

Copy link

apupier commented Mar 23, 2017

I also get this issue on an image which was working before.
I also reproduce with the simple "docker run -p 8080:8080 hello-world"

my version of Docker is 1.13.1 (10072)
I'm on Windows 10

I made no update of Windows, neither Docker between the working/failing state.

EDIT: a restart and an upgrade to Docker Tooling 17.03.0-ce-win1 (10296) has fixed the issue for me

@WrRaThY

This comment has been minimized.

Copy link

WrRaThY commented Mar 23, 2017

what do you mean by "docker tooling" ?
my Docker version is 1.12.3, build 6b644ec (stable)
and if I check for updates I get the info, that its the latest one

EDIT: I found something like that in logs:
Version: 17.03.0-ce-win1 (10296)
seems to be the same version as what you pasted. no idea whats that ;p

EDIT2: issue seems to be gone for no apparent reason...

@Magdaflowne

This comment has been minimized.

Copy link

Magdaflowne commented Mar 24, 2017

Post updated

Desactiving "Experimantal Features" (checked by default) solve my issue

@webdesignberlin

This comment has been minimized.

Copy link

webdesignberlin commented Mar 31, 2017

Same Problem with Docker version 17.03.1-ce, build c6d412e
Windows 10 Enterprise v1607 Build 14393.953
virtualization: native hyper-v

@ajhodges

This comment has been minimized.

Copy link

ajhodges commented Apr 6, 2017

Same issue...

ID: FFAB1CCB-ED9B-4799-A2F7-84B7501121FC/2017-04-06_11-01-38
Windows 10 Version 1607 Build 14393.726, using Hyper-V

Using this docker image: puckel/docker-airflow
https://github.com/puckel/docker-airflow

As @Magdaflowne said, unchecking "Experimental features" under "Daemon" seems to have fixed this issue.

@raghavmac

This comment has been minimized.

Copy link

raghavmac commented May 15, 2017

  1. Stop all the running containers docker stop $(docker ps -a -q) then
  2. Stop the Docker on your machine & restart it.
@ikrysenko-selectica

This comment has been minimized.

Copy link

ikrysenko-selectica commented Jul 25, 2017

solution by @raghavmac works for me, thanks!

@ahemsath

This comment has been minimized.

Copy link

ahemsath commented Aug 18, 2017

Windows Powershell equivalent of @raghavmac's one-liner to stop all running containers:
docker ps -a -q | ForEach { docker stop $_ }

@scopev24

This comment has been minimized.

Copy link

scopev24 commented Aug 22, 2017

Hi!

Unfortunately we are currently facing the same errors.

We are running a freshly installed Windows Server 2016 where our developers work using RDP.

There are just two containers at the moment: apache-dev (based on centos:7) and redis-dev.

The redis container is started as follows:

docker run --rm -v c:/apps/redis/redis.log:/var/log/redis.log -v c:/apps/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro -itd -p 6379:6379 --name redis-dev redis:3 redis-server /usr/local/etc/redis/redis.conf

Both work as expected, but are not heavily used, since we're just evaluating docker in our new environment.
After a few hours (mostly over night) - I return to the server (which has not been used meanwhile) just to notice, that there seems to be something wrong - e.g. the php application running on the apache container complaining that redis is not reachable, or that it is not able to access our Oracle Database (which does not run in a containerized environment). Apache itself was reachable through the local browser at that time.

I then stop both containers.

If I try to start the containers again, I get something like this:

C:\apps\redis>start_redis.bat
b33f8ccf8121de2e8e12e00e823ec891f40a104c8576a46d83e9b22a9de4ed9c
docker: Error response from daemon: driver failed programming external connectivity on endpoint redis-dev (b36dc0f21c4f40665b38dac87e5a4eb7482c72cd8c9430fadcecac1224be56b0): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.17.0.3:6379: input/output error.

The batch file just contains the commmand from above.
If I use "Restart docker" on the "Reset" tab in the docker gui, I am again able to start both containers.

This issue hit me various times. Another example: I spawned a bash inside the apache container to test a few things but noticed, there was no internet connectivity. So I stopped the container and got the very same error on starting it. Restarted docker, started the container - spawned a bash, everything ok again.

It always seems like network connectivity gets lost after some time - and whatever happens prevents the containers to start again, after they have been stopped.

I uploaded a diagnostic, hoping that it helps:
0399F110-0301-424D-B0F7-3CC0E0C7C8CC/2017-08-22_09-16-15

I'm happy to provide more details - just don't know where to start my search...

Thanks!

Nico

@22samurai

This comment has been minimized.

Copy link

22samurai commented Nov 1, 2017

Deactivating experimental features also worked for me

1 similar comment
@oskaremil

This comment has been minimized.

Copy link

oskaremil commented Nov 10, 2017

Deactivating experimental features also worked for me

@endlos

This comment has been minimized.

Copy link

endlos commented Nov 10, 2017

Got this error today with no apparent reason after working well always, and deactivating experimental features solved it.

@rmolinag

This comment has been minimized.

Copy link

rmolinag commented Dec 14, 2017

+1 to fix by disabling experimental features, it would be nice to know which feature was causing it.

@Jamby93

This comment has been minimized.

Copy link

Jamby93 commented Dec 18, 2017

Anyone that has 'solved' disabling experimental features (that needs a reboot of the VM that we already know can fix the problem) has never seen it happen again for a month or more?
We continue experimenting this issue after some days or weeks of uptime, the only solution so far seems to reboot everything, disabling experimental features did nothing.
This is the main issue that prevent us to going in production with Docker for Windows, we can't reboot production's vm every other week.

@daniel-gwilt-software

This comment has been minimized.

Copy link

daniel-gwilt-software commented Dec 21, 2017

Disabling "Experimental Features" in the Settings/Daemon menu, restarting docker and then stopping all images worked for me.

image

@Jamby93

This comment has been minimized.

Copy link

Jamby93 commented Dec 21, 2017

@daniel-gwilt-software Worked for how long? More than a month of uptime?

@rickvanbodegraven

This comment has been minimized.

Copy link

rickvanbodegraven commented Dec 21, 2017

I am starting to suspect that disabling the experimental features isn't "fixing" the issue, but the fact that you press "apply" and the Docker VM reboots upon that action, is actually "fixing" the issue.

@adampl

This comment has been minimized.

Copy link

adampl commented Dec 29, 2017

The same issue. Each time I open my Windows 10 laptop (boot the system) and the Docker service starts, I'm unable to bring my Docker Compose project up, because:

Creating code_application_1 ... error

ERROR: for code_application_1  Cannot start service application: driver failed programming external connectivity on endpoint code_application_1 (bd7f89ef4c1b0c6cbb4eb82ba552e5ccbf87f168ad81b8f8656bdc6443c2ef79): Error starting userland proxy: mkdir /port/tcp:0.0.0.
0:8888:tcp:172.18.0.4:8000: input/output error

ERROR: for application  Cannot start service application: driver failed programming external connectivity on endpoint code_application_1 (bd7f89ef4c1b0c6cbb4eb82ba552e5ccbf87f168ad81b8f8656bdc6443c2ef79): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8888:
tcp:172.18.0.4:8000: input/output error
ERROR: Encountered errors while bringing up the project.

Here is the diagnostic ID: 65B03A6A-4D0B-4364-A84C-41DDE0B4AB0F/2017-12-29_14-27-34

After I stop the service (quit docker) and then start it again, everything works fine.

Here is my compose file:

version: "3.4"

services:
  data:
    image: postgres
    env_file:
      - vars.env
  messages:
    image: rabbitmq
    env_file:
      - vars.env
  application:
    build: .
    env_file:
      - vars.env
    command: gunicorn --bind=0.0.0.0:8000 --workers=4 proj.wsgi
    volumes:
      - .:/code
    ports:
      - "8888:8000"
    depends_on:
      - data
      - messages
@DGolubets

This comment has been minimized.

Copy link

DGolubets commented Dec 30, 2017

Yeah, as @rickvanbodegraven said - it has nothing to do with experimental features, it is just restarting Docker that helps.

I have Win 10 with docker Postgres container for development bound to my local port. Every time I restart PC - i have to recreate container, otherwise it won't work. That's annoying.

@piers7

This comment has been minimized.

Copy link

piers7 commented Jan 3, 2018

I had this issue today with Docker for Windows 10 (x64, Community) Version 17.09.1-ce-win42 (14687). As other have said, restarting the daemon fixed it (I still have experimental features enabled).

Containers I've been using have been stable for months prior to this.

@ghost

This comment has been minimized.

Copy link

ghost commented Jan 3, 2018

+1 for this issue. Previously I had the cold boot startup error where docker would popup a timeout when I first booted my PC (Windows 10 Pro version 1709) but that went away and docker seemed to be working fine until I had to start interacting with containers then I would get this userland proxy issue requiring a VM reboot.

@daniel-gwilt-software

This comment has been minimized.

Copy link

daniel-gwilt-software commented Jan 3, 2018

@Jamby93 I've only been using my current docker set up for a couple weeks, but it is currently working. I'm using docker for development so I turn my containers on and off frequently. If I'm working on the server I could do it 10 or 20 times in a single day. The issue did emerge again, but a simple docker daemon restart fixed it this time.

@rickvanbodegraven You may be correct about that. I tried starting my image today, got the proxy error, simply restarted docker and everything worked again.

@petegore

This comment has been minimized.

Copy link

petegore commented Jan 3, 2018

Got the same issue with mysql image today. Worked fine yesterday.
Solved it by setting "experimental features" off.

@ztane

This comment has been minimized.

Copy link

ztane commented Nov 21, 2018

Nothing else works except restart. It is very annoying that after a reboot of the machine I need to manually restart the Docker too (and also every now and then anyway due to failing mounts).

@lucyandsandy

This comment has been minimized.

Copy link

lucyandsandy commented Nov 22, 2018

restart dockers solved my problem

@Kitkevich

This comment has been minimized.

Copy link

Kitkevich commented Nov 22, 2018

Same error message for me - restart dockers solved my problem

@Zaradar

This comment has been minimized.

Copy link

Zaradar commented Nov 22, 2018

Same error - restart does the trick. Can anyone confirm if this flaw also affects Docker EE or is it only hitting CE?

@ajkumar01

This comment has been minimized.

Copy link

ajkumar01 commented Nov 24, 2018

For me the issue went away, when i invoke 'docker run -p123:456 .... ' from a powershell that was run as 'Administrator'.

Version 2.0.0.0-win78 (28905)
Channel: stable
Build: c404a62
(docker engine version: 18.09.0)

@vetras

This comment has been minimized.

Copy link

vetras commented Nov 27, 2018

Disable experimental features and restart docker on windows worked for me.

@GhitaCristian

This comment has been minimized.

Copy link

GhitaCristian commented Dec 3, 2018

I had the experimental features turned off by default. Pressing 'Restart Docker Desktop...' in Reset section fixed it for me on win 10.
image

@codersk

This comment has been minimized.

Copy link

codersk commented Dec 4, 2018

  1. Stop all the running containers docker stop $(docker ps -a -q) then
  2. Stop the Docker on your machine & restart it.

Worked for me

@WilliamStam

This comment has been minimized.

Copy link

WilliamStam commented Dec 4, 2018

no need to do anything "clever" like experimental features etc.. the FIX is pretty much just "restart docker"

docker on windows is a pain in the butt :(

@tmcentee

This comment has been minimized.

Copy link

tmcentee commented Dec 4, 2018

I know this has been stated many times in this thread, but everything regarding "restart docker" isn't a fix.

They are workarounds to a real issue that is obviously affecting many people day-to-day.

@friism is there anything else we can do to get this looked at?

@friism

This comment has been minimized.

Copy link

friism commented Dec 4, 2018

@Chuiantw1212

This comment has been minimized.

Copy link

Chuiantw1212 commented Dec 6, 2018

  1. Stop all the running containers docker stop $(docker ps -a -q) then
  2. Stop the Docker on your machine & restart it.

Somehow it works.

@elcamlost

This comment has been minimized.

Copy link

elcamlost commented Dec 13, 2018

faced issue today. restart docker was helping.
But it's not a solution for everyday work.

Please, fix it.

@coreyman

This comment has been minimized.

Copy link

coreyman commented Dec 16, 2018

Had this issue today. Restarted docker and started my container. It asked me to allow vpnkit through the firewall. I allows it through the firewall and all is working.

@NorthNick

This comment has been minimized.

Copy link

NorthNick commented Dec 17, 2018

I did some more investigation and I found out that since the Fall Creators Update windows has a new "hybrid shutdown" feature. What it does is storing the state of open applications and reopen those when you start your pc/laptop again. This is the default behavior when clicking "start -> power -> shutdown".

This behavior can't be switched off, but you can shutdown manually in your terminal as before:
shutdown.exe /s /t 0 (Adding /hybrid would enable the current behavior)

If I shutdown with this command I don't have the mentioned issues anymore.

According to the release notes of insider-preview-build-17040 this hybrid shutdown behavior can be disabled starting from 17040.

Based on your feedback, the feature to restore applications that have registered for application restart after you reboot or shutdown (through power options available on the Start Menu and various other locations) has been set to only occur for users that have enabled “Use my sign-in info to automatically finish setting my device after an update or restart” in the Privacy section under Sign-in Options Settings.

I'm guessing that somehow docker must detect that the device was restarted after a hybrid shutdown and clear some settings first.

Turning off fast startup in Control Panel, Hardware and Sound, Power Options, System Settings solved the problem on my Win 10 laptop. Docker takes a lot longer to start after bootup now, but containers run properly, while one of them reliably needed a service restart before.

@muliar

This comment has been minimized.

Copy link

muliar commented Dec 19, 2018

Had the same issue after updating to Version 2.0.0.0-win78 (28905).
Nothing above helped.
Only Reset to factory defaults helped:
image

Your solution really helped.

@bhatnagarm

This comment has been minimized.

Copy link

bhatnagarm commented Dec 24, 2018

Restarting Docker deamon worked for me.

@znmeb

This comment has been minimized.

Copy link

znmeb commented Dec 24, 2018

@NorthNick I've tried this - so far I haven't seen any failures since I disabled fast startup. Can someone who knows the code explain why this works - I don't like "folk theorems" about software.

@atsaloli

This comment has been minimized.

Copy link

atsaloli commented Dec 27, 2018

I installed Docker Desktop on my Windows 10 laptop yesterday and ran into this problem. I've restarted Docker for Desktop, which got me going again, and disabled fast startup hoping that will help prevent the problem from happening again. It would be nice if everything just worked out of the box without having to fiddle with the system settings. :) In any case, amazing technology, I appreciate it!

@orangeswim

This comment has been minimized.

Copy link

orangeswim commented Dec 27, 2018

If Docker Desktop is not set to run automatically on startup, then make sure to start Docker for Windows as administrator. That solved the issue for me.
I'm on Win 10 with a new installation of Docker Desktop.

@mshauny

This comment has been minimized.

Copy link

mshauny commented Dec 28, 2018

Between enabling advanced daemon settings and setting experimental to true worked for me. Running linux containers on a win10.
image

@NorthNick

This comment has been minimized.

Copy link

NorthNick commented Dec 28, 2018

Between enabling advanced daemon settings and setting experimental to true worked for me. Running linux containers on a win10.

Nice! That worked for me as well. In fact: leaving the Daemon setting as Basic, and just ticking the Experimental features box did the trick on my machine.

@adaolima

This comment has been minimized.

Copy link

adaolima commented Jan 7, 2019

In my case I setted a fixed DNS ( 8.8.8.8 ), with unchecked Experimental features , and that worked.

@Lauriy

This comment has been minimized.

Copy link

Lauriy commented Jan 11, 2019

Dudes, you're all restarting Docker probably to apply settings.

@rickvanbodegraven

This comment has been minimized.

Copy link

rickvanbodegraven commented Jan 11, 2019

I thought we'd already established that, like, at least 100 comments ago. It's about time we get a response from the Docker team themselves how they plan on fixing this.

@ChuckkNorris

This comment has been minimized.

Copy link

ChuckkNorris commented Jan 11, 2019

Might make sense to remove the More Info Needed label. I think we have plenty of information pointing to the fact that Docker needs to more gracefully work with the fast startup feature in Windows 10.

@PMT87

This comment has been minimized.

Copy link

PMT87 commented Jan 18, 2019

Why disable fast startup?

Leaving fast startup enabled shouldn't harm anything on your PC — it's a feature built into Windows — but there are a few reasons why you might want to nevertheless disable it.

One of the major reasons is if you're using Wake-on-LAN, which does not work when your PC is shut down with fast startup enabled. Others would like to save the hard drive space that is usually taken up with the hibernation file, and Linux users will likely see complications with dual boot and virtualization. Furthermore, some users have even reported that power buttons on their keyboard will not work and fans in their PCs will continue spinning. These problems are by no means across the board, but they can prove to be frustrating.

Taken from https://www.windowscentral.com/how-disable-windows-10-fast-startup

Is that really a Docker Problem or more a Windows Problem?

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