docker / for-win

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

Client.Timeout exceeded while awaiting headers #1534

Closed AleksandrOrlov closed 4 years ago

AleksandrOrlov commented 6 years ago

Expected behavior

Download Image and create container

Actual behavior

Unable to find image 'hello-world:latest' locally docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers). See 'docker run --help'.

Information

Diagnostic Id: AD27B128-4EC0-4888-9470-22E42CD7DF37/2018-01-12_13-49-18

I try all variations of solution, and they not working for me: 1) Set DNS to Fixed 8.8.8.8 2) Reset factory/Reinstall docker/Reboot docker or computer

Steps to reproduce the behavior

  1. Execute command in console: docker run hello-world

``

vikingurh commented 6 years ago

Same thing here...

thomao commented 6 years ago

I also experience the same issue...

jasonbivins commented 6 years ago

Hi @AleksandrOrlov Are you using a proxy? If so, what do you have setup in the GUI under settings? Can you run the docker login command It also looks like the D: drive was unmounted or unreachable according to the logs

[13:11:11.235][ApiProxy ][Info ] time="2018-01-12T13:11:11+07:00" msg="proxy << POST /v1.35/images/create?fromImage=hello-world&tag=latest\n" [13:11:11.236][VpnKit ][Warning] vpnkit.exe: 9f31 Query:0 na:c:r:rn 0 <qs:registry-1.docker.io.localdomain. <AAAA|IN>> lookup failed: no servers

helysousa commented 6 years ago

I had the same problem and following @jasonbivins' instructions in the post above I noticed that I couldn't also run docker login. After fixing the username and password issue I was ready to run docker login and docker run hello-world. Thanks, @jasonbivins for the insight provided.

agui2200 commented 6 years ago

Same thing here... too but i try switch docker containers can fix him, but can't pull linux platform images...WTF? and i try "docker login" is same too. and i try switch docker config ,some time no change (i restart docker from windows). platform : windows 1709 docker : 17.12.0-ce

pavelpp commented 6 years ago

interesting enough same docker for win version is working on my work computer, but fails on my home desktop. Both are running Windows 10. login and docker helloworld are failing. Restarts/resets are not helping. Tried disabling system firewall - no difference. My diagnostic file 54D99348-B82A-4DCB-B54B-83982186DA79/2018-01-15_21-11-13

OzzyKampha commented 6 years ago

Same thing here... too Tried docker login and restart windows, hyper-v and reinstalled docker

dElogics commented 6 years ago

Looks like the registry or Internet is slow and there's no way to set this timeout. That explains the random behavior.

pavelpp commented 6 years ago

@dElogics it's not random. Two machines connected to the same router, fast internet. One works another does not in 100% cases.

marcusholl commented 6 years ago

Same thing on our side.

IngoVals commented 6 years ago

I'm having the same problem and for me it doesn't work with Linux containers but works fine with Windows containers.

mmhh1910 commented 6 years ago

Seems to be resolved for me when disabling experimental features.

IngoVals commented 6 years ago

Yeah this is a known bug, more info here.

f-lopes commented 6 years ago

Worked for me using @helysousa solution: docker login [registry]. Thanks.

montao commented 6 years ago

Doesn't work. This makes Docker completely useless for us.

YaMolekula commented 6 years ago

Same problem. I can't download any image.

garciasa commented 6 years ago

Same issue. I've tried everything I've seen on Internet but nothing works :(

dev-e commented 6 years ago

I also confirm issue but only with docker.io repository. I am able to pull images correctly from other repos like quay,io, gcr.io, elastic.co. Not sure how to reproduce the issue, sometimes images are pulled, sometimes not on different hosts. Docker is behind corporate ssl proxy.

~ $ docker version
Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.4
 Git commit:   9ee9f40
 Built:        Thu Apr 26 04:27:49 2018
 OS/Arch:      linux/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   9ee9f40
  Built:        Thu Apr 26 04:27:49 2018
  OS/Arch:      linux/amd64
  Experimental: false
cakirilker commented 6 years ago

Docker was working fine and all the sudden I got same error when pulling images.

Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Changing DNS to 8.8.8.8 / 8.8.4.4 and restarting docker solved my issue.

sumitdubey022229 commented 6 years ago

I also faced same problem. I tried many solutions but what solved my problem was this one- If you are behind a proxy then follow these steps:

  1. Remove network proxy in Network &Settings. 2.Configure Docker Proxy in following format http://username:password@proxy-server:proxy-port for http proxy replace http by https for https proxy.

eg: http://sumitDubey:password@proxy@company.com:8080

monsdar commented 6 years ago

I was able to do docker login just yesterday. Today it's not possible anymore. Same network, same computer, same installation, same docker version. No proxy in my network, free access to the internet.

I changed the DNS to 8.8.8.8 and 8.8.4.4 for all adapters I could find (Wireless, LAN, vEthernet, ...) and restarted docker. Worked after doing that. I'm not sure if it really is connected to setting the DNS, perhaps it's just luck that it worked again after the restart.

jasclarke24 commented 6 years ago

I get same exception behind a proxy. I can docker login with no wildcards in my bypass list and an entry in bypass list for proper domain. Put a pull from internal repo inside of proxy fails with (Client.Timeout exceeded while awaiting headers)

In addition, tried doing this with Experimental features disabled which had no affect on failure.

Also tried with "No Proxy" set and still no effect on failure. I can login but not pull.

Switched DNS to Fixed: 8.8.8.8 and could no longer log in. Can login with above settings when DNS Automatic selected.

jasclarke24 commented 6 years ago

I got it working with the following settings

1) Proper Manual Proxy Configuration with proper domain in bypass list (no wildcards) mydomain.com 2) Experimental Features disabled (this may or may not be an effect) 3) DNS Server set to Automatic

Note: It may have been an issue mostly for me regarding the path to my actual image in the repo

jefjos commented 6 years ago

I faced this issue in Windows and turning off and turning back on Windows feature Hyper-V helped me.

matheuslemke commented 6 years ago

Missing proxy configuration?

mkdir -p /etc/systemd/system/docker.service.d nano /etc/systemd/system/docker.service.d/http-proxy.conf

[Service] Environment="HTTP_PROXY=http://USER:PASSWD@SERVER:PORT/" Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER:PORT/"

systemctl daemon-reload systemctl restart docker

spawn1978 commented 6 years ago

Thanks! It worked

MPJHorner commented 6 years ago

I was getting the same errors (on Windows)

Version 18.03.1-ce-win65 (17513)
Channel: stable
93354b3

Restarted docker, works fine.

PranavKD commented 6 years ago

The following solution worked for me:

  1. create new virtual switch manager and set it type as external.
  2. Click on MobyLinuxVM settings and change its network adapter to the newly created virtual switch manager.
  3. Open your docker settings and go to network tab. Select Fixed option under DNS Server.(The value will be 8.8.8.8)
matheuslemke commented 6 years ago

@AleksandrOrlov can you close this issue please?

Thanks

jainishshah17 commented 6 years ago

Same here. I am using docker on ubuntu.

tomtom30 commented 6 years ago

For me too, with ubuntu server.

Femina commented 6 years ago

I got the same error. But, after Docker Login everything seems to be working fine.

jokerdrake commented 6 years ago

@cakirilker Thx, I solved this problem.

d3vit commented 5 years ago

Logging in and restarting Docker fixed this issue for me

huenisys commented 5 years ago

I switched from cable ISP to LTE and it worked. Now, what could be blocking on the ISP level? what can I do?

byondrnd commented 5 years ago

I am experiencing the same problem. It used to work perfectly until recently and stopped. Blocking me from doing anything with docker for windows. As far as version data goes: .\docker.exe version Client: Docker Engine - Community Version: 18.09.0 API version: 1.39 Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:47:51 2018 OS/Arch: windows/amd64 Experimental: false

Server: Docker Engine - Community Engine: Version: 18.09.0 API version: 1.39 (minimum version 1.12) Go version: go1.10.4 Git commit: 4d60db4 Built: Wed Nov 7 00:55:00 2018 OS/Arch: linux/amd64 Experimental: false

I tried all of the suggested solutions and workarounds suggested in this issue... Including, docker reinstallation, dns configurations, reboots, switching networks (LTE, Wifi, Ether, etc...), different ISPs, etc... None worked.

It is obviously severely affecting numerous installations.

cedmcgee commented 5 years ago

I had the same problem and following @jasonbivins' instructions in the post above I noticed that I couldn't also run docker login. After fixing the username and password issue I was ready to run docker login and docker run hello-world. Thanks, @jasonbivins for the insight provided.

What was the issue ?

matheuslemke commented 5 years ago

I had the same problem and following @jasonbivins' instructions in the post above I noticed that I couldn't also run docker login. After fixing the username and password issue I was ready to run docker login and docker run hello-world. Thanks, @jasonbivins for the insight provided.

What was the issue ?

Proxy configuration

WattsC-90 commented 5 years ago

Missing proxy configuration?

mkdir -p /etc/systemd/system/docker.service.d nano /etc/systemd/system/docker.service.d/http-proxy.conf

[Service] Environment="HTTP_PROXY=http://USER:PASSWD@SERVER:PORT/" Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER:PORT/"

systemctl daemon-reload systemctl restart docker

While this solves the issue, you always need to reload the daemon and restart the docker service, how can I get it to work on boot? if the service is enabled, it still doesnt load these proxy settings until it is reloaded and restarted

jigar-dhulla commented 5 years ago

I use docker-compose for one of my project which creates the docker network for that project. I did the following to make things work.

Sorry, I don't know what happens behind the scene. But this worked for me.

May be pruning network can help

shawn-ogg commented 5 years ago

I have the same issue. After a fresh boot I get those timeout errors (for any network related command). Only after a restart of docker-desktop everything works fine. My guess would be that all those suggestions of changing one google dns with another are not so important - The restarting of the docker service was it!

Anyway this is a pretty annoying behavior. I had the same behavior on the edge and the sable channel.

WowMuchName commented 5 years ago

Not behind a proxy. Changing DNS to 8.8.8.8, then changing it back to automatic made the error go away.

HendricksK commented 5 years ago

had the same issue, my DNS was set to 8.8.8.8 snd I set it to dynamic and that seems to have fixed the issue, so similar fix to @WowMuchName

jtanaka commented 5 years ago

The solution by @WowMuchName works for me too. I knew how to change DNS with the image below. image Image from https://satoyashiki.hatenablog.com/entry/2017/04/01/175604

Genovo commented 5 years ago

or...it could just be timing out because the dockerhub server is busy downloading 800MB images all day.... or...your local ISP is throttling large downloads...because they can do that now...

aliwo commented 5 years ago

Docker was working fine and all the sudden I got same error when pulling images.

Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Changing DNS to 8.8.8.8 / 8.8.4.4 and restarting docker solved my issue.

Thanks! It works like charm! Btw, Why is this working?

gcartier94 commented 5 years ago

The fix for me was to select "Switch to Windows Containers".

KrazyMax commented 5 years ago

Missing proxy configuration?

mkdir -p /etc/systemd/system/docker.service.d nano /etc/systemd/system/docker.service.d/http-proxy.conf

[Service] Environment="HTTP_PROXY=http://USER:PASSWD@SERVER:PORT/" Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER:PORT/"

systemctl daemon-reload systemctl restart docker

Thanks for this answer! It helped me and solved my proxy issue. I don't understand the Docker documentation I followed then... I did what was specified, but does not work (they ask user to create another file in another directory than those you wrote here). Docker documentation is a bit messy in my opinion!

sbdevman commented 5 years ago

I had this problem, and it is because my country in under US sanctions, I use VPN and it is solved for me.

guzzijones commented 5 years ago

KrazyMax is right. on Centos the config setting does not work.