Skip to content
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

Closed
signsmile opened this issue Mar 12, 2017 · 231 comments

Comments

@signsmile
Copy link

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
Copy link

friism commented Mar 15, 2017

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

@Magdaflowne
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
Copy link

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
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
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
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
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
Copy link

Magdaflowne commented Mar 24, 2017

Post updated

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

@webdesignberlin
Copy link

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

@ajhodges
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
Copy link

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

@ikrysenko-selectica
Copy link

solution by @raghavmac works for me, thanks!

@ahemsath
Copy link

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

@nscheer
Copy link

nscheer 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
Copy link

Deactivating experimental features also worked for me

1 similar comment
@oskaremil
Copy link

Deactivating experimental features also worked for me

@endlos
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
Copy link

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

@Jamby93
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
Copy link

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

image

@Jamby93
Copy link

Jamby93 commented Dec 21, 2017

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

@rickvanbodegraven
Copy link

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
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
Copy link

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
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
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
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
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.

@niclarcipretti
Copy link

@akshaypurohit 's solution didn't work for me.

Imho, restart Docker is not a viable solution (once Docker take centuries to restart on windows).
I do understand that docker will evolve to let hyper-v finally go, but, I do think this issue should be addressed once some production environments will not be able to update Docker until it's stable or because of some company policy.

Can any Docker engineer give some thoughts on this issue?

Thanks in advance.

Nikao

@guiprerod
Copy link

In my case it was working when I selected "Experimental features"

@niclarcipretti
Copy link

@guiprerod, read the entire thread plz.

@judos
Copy link

judos commented Jul 31, 2019

@akshaypurohit @harpsdesire

Solution: Simply disable "Start Docker Desktop when you log in".
But keep it at start-up program (e.g. copy a link to docker into your startup folder here:
%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

This will make Docker start later after logging in and that works for many people.

@jasonwilliams
Copy link

This issue should be fixed by #2722 (comment)

@rikipm
Copy link

rikipm commented Aug 1, 2019

It works, I stop getting this problem after last update.

@nicolasmafra
Copy link

I was with the following message:

docker run -d -e ALLOW_OVERRIDE=true -v /:/app/exchange -p 80:80 --name exchange nickmafra/exchange 2650193e659df17ebf03f7f4b730670255049da3a86470859a8538eda11ebe27 docker: Error response from daemon: driver failed programming external connectivity on endpoint exchange (23e2644665fff7f69074b64cd3aec640121780cb1519262230ccb71ed4bf533d): Error starting userland proxy: /forwards/expose/port returned unexpected status: 500.

I changed ports for 81 and it fixed the issue

@jakubsgil
Copy link

Hi there, I have upgraded to the newest docker version (2.1.0.1) and then started to see this issue. Restarting docker does not seem to work/resolve this. Only see this problem go away is when I reinstall docker. Is there some sort of port or firewall related issue that I might be seeing from an enterprise IT restriction?

@Vespira
Copy link

Vespira commented Aug 28, 2019

Hi there, I have upgraded to the newest docker version (2.1.0.1) and then started to see this issue. Restarting docker does not seem to work/resolve this. Only see this problem go away is when I reinstall docker. Is there some sort of port or firewall related issue that I might be seeing from an enterprise IT restriction?

Hi, I posted a similary message and I just want you to know something. A wild guess make me think that when you shutdown your computer while docker is running some containers could corrupt the state of networks or containers (for me it was networks). I resetted to factory settings Docker, but next time I'll try only to remove concerned docker network, and try to run again my docker-compose deploy to see if recreating network is sufficent.

Hope it helps

@andrewfinnell
Copy link

Our team also experiences these issues. I'm wondering if @Vespira is on to something regarding running Containers and the machine going to sleep or being shut down. Either way, this is quite unfortunate that it's been years and this still occurs.

Successfully built 12bd2d95a54d
Successfully tagged *************:latest
Creating eureka-1 ...
Creating ************* ...
Creating *************  ... error

Creating eureka-1            ... error
f7105d8a7e7e3948f1f25ff10a5d32d246ae68ebb67edcf170ffde000): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8080:tcp:172.20.0.2:8080: input/output error

Creating ************* ... error
17eb30a47aff4b854f3370083dd): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8761:tcp:172.20.0.3:8761: input/output error

ERROR: for *************  Cannot start service *************: driver failed programming external connectivity on endpoint *************(c993dd36af5da2482f7d48cbc884002ce4cb3fc219cf550b017d1f13eabac2a1): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5432:tcp:172.20.0.4:5432: input/output error

ERROR: for *************  Cannot start service *************: driver failed programming external connectivity on endpoint ************* (9864f9bf7105d8a7e7e3948f1f25ff10a5d32d246ae68ebb67edcf170ffde000): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8080:tcp:172.20.0.2:8080: input/output error

ERROR: for eureka-1  Cannot start service eureka-1: driver failed programming external connectivity on endpoint eureka-1 (9588322c5bf824f0d40570802181e3e2d647017eb30a47aff4b854f3370083dd): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:8761:tcp:172.20.0.3:8761: input/output error

ERROR: for *************  Cannot start service *************: driver failed programming external connectivity on endpoint ************* (c993dd36af5da2482f7d48cbc884002ce4cb3fc219cf550b017d1f13eabac2a1): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5432:tcp:172.20.0.4:5432: input/output error
ERROR: Encountered errors while bringing up the project.

@mreilaender
Copy link

mreilaender commented Sep 19, 2019

I think for each port specified to be exposed for a container docker starts a process, which is not correctly terminated, when docker or the container is shut down.

The solution I came up with:

  1. Stop docker
  2. Find the process(es) which is using the port(s) and kill them
  3. Start docker
  4. Start your containers

Powershell command to kill a process which is listening on a specified port (requires admin privileges):

Stop-Process -Id (Get-Process -Id (Get-NetTCPConnection -LocalPort <portNumber>).OwningProcess).Id

Substitude <portNumber> with the actual port number

@dobrik
Copy link

dobrik commented Oct 29, 2019

  1. Kill process com.docker.backend.exe
  2. Restart docker desktop

@nguyenhongphu
Copy link

If anyone using Windows, a simple solution would be to install whatever pending updates of Windows, then restart your computer! It worked for me :)

@Vespira
Copy link

Vespira commented Nov 7, 2019

"Reset to factory defaults..." solved the issue.
This action will remove ALL docker containers and images!

docker_reset

Yes it was mentionned few times here and in other threads about this... But for most of us, it can't be a viable solution because re-downloading tons of images and recreating test data is damn slow.

My current tip for preventing this was also mentionned; you can disable fastboot on Windows, in the Power options to prevent Docker from being corrupted by an hybrid shutdown ;)

@craftsman-expert
Copy link

Do not let Docker start with Windows

@marcinpejski
Copy link

1. Kill process **com.docker.backend.exe**

2. Restart docker desktop

Killing all the processess of docker (backend/proxy/service) and quitting and starting docker once again did the trick for me.

@AlexQuidditch
Copy link

AlexQuidditch commented Dec 19, 2019

I found solution for Windows 10:

  1. Stop Docker Desktop
  2. Win + R (or cmd) > $ services.msc
  3. Find "Docker Desktop Service"
  4. Restart it
  5. Run Docker Desktop

@spawnrider
Copy link

I found solution for Windows 10:

  1. Stop Docker Desktop
  2. Win + R (or cmd) > $ services.msc
  3. Find "Docker Desktop Service"
  4. Restart it
  5. Run Docker Desktop

This works for me on Windows 10 and Docker Desktop 2.1.0.5

@elonderin
Copy link

  • problem happened to me too
  • i think the culprit was, that i changed CPU and RAM in the advanced settings, which caused the docker desktop to restart while containers were running with `--restart unless-stopped'
  • Windows 10 and Docker Desktop 2.1.0.5
  • after trying the advice to shutdown and restart this wouldn't work at first (tried it 2x b/c i had not stopped docker desktop before)
  • still, after doing the exact steps from above it failed
  • then i opened the settings and went back to advanced settings , where i noticed that they had revered to the default settings
  • however, i dont remember having reset them
  • after that it suddenly worked !?

thoughts:

  • could it be that the restarting the service actually takes longer than what the windows status says ?

@docker-robott
Copy link
Collaborator

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

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests