Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) #2956

Closed
zbitname opened this issue Aug 14, 2017 · 16 comments

Comments

@zbitname
Copy link

Expected behavior

Pull and run container.

Actual behavior

Docker return error with message:
(HTTP code 500) server error - {"message":"Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"}
at pull image.

Information about the Issue

Platform: Win10 x64
Docker version 17.06.0-ce, build 02c1d87
I don't use proxies and VPN. Speed of internet connection is ~90Mb/s.

Steps to reproduce the behavior

I reproduce this issue on creation container with "mongo". Percent of reproduce this issue is ~95%, sometimes everything goes well.

@FrenchBen
Copy link
Contributor

Please make sure that you're on a stable connection and use a solid DNS such as Google DNS.

@saibhaskerraju
Copy link

Go to Docker settings > network > DNS server . change from automaic to fixed ( default is 8.8.8.8 )

@SiddiquiImran
Copy link

@fastinetserver
Copy link

I had a similar issue trying to login to my own docker repo.
Here is how i've managed to resolve it:
https://stackoverflow.com/questions/46822391/docker-toolbox-tutorial-client-timeout-exceeded-while-awaiting-headers/48064026#48064026

@matheuslemke
Copy link

matheuslemke commented Jul 18, 2018

My problem was missing proxy config:

nano /etc/systemd/system/kitematic.service.d/proxy.conf

[Service]
Environment=http_proxy=http://host:port

systemctl restart snapd

@Tony427
Copy link

Tony427 commented Dec 21, 2018

Go to Docker settings > network > DNS server . change from automaic to fixed ( default is 8.8.8.8 )

This is god damn works !!

@adamfortuno
Copy link

I had this exact issue with the "jenkins/jenkins:lts" container. I'm running...

docker pull jenkins/jenkins:lts

I get the following error:

image

Running the 10.0.17763.0 build of Windows 10 (64-bit).

I resolved by restarting the Docker service.

image

@juanmigutierrez
Copy link

Go to Docker settings > network > DNS server . change from automaic to fixed ( default is 8.8.8.8 )

Works !

@cvladan
Copy link

cvladan commented Mar 26, 2019

Go to Docker settings > network > DNS server . change from automaic to fixed ( default is 8.8.8.8 )

Works !

I also confirm this is the solution.

@zllegol
Copy link

zllegol commented May 6, 2019

Works

@mohdumaira
Copy link

Go to Docker settings > network > DNS server . change from automaic to fixed ( default is 8.8.8.8 )

Thanks for the solution. I was stuck for half a day on this. It works.

@stella-lu
Copy link

stella-lu commented Jun 24, 2019

Does anyone know how to do this now? I tried going to "Preferences" under Docker, but I can't find anything about network or DNS server so I don't know how to change the DNS server settings.

I am using Docker Desktop, Docker version 18.09.2 on MacOS Mojave version 10.14.5

@nclsjstnn
Copy link

Does anyone know how to do this now? I tried going to "Preferences" under Docker, but I can't find anything about network or DNS server so I don't know how to change the DNS server settings.

I am using Docker Desktop, Docker version 18.09.2 on MacOS Mojave version 10.14.5

i had to go preferences to proxies > manual configuration proxy > and set web server (http) to 8.8.8.8

@diegoldev
Copy link

Installing Docker update 2.1.0.1 fix the problem for me.

@hsmiranda
Copy link

i'm resolved this problem with setting proxy variables correct, oc or kubectl utilize proxy variables for connect to api even on localhost.

@minato7
Copy link

minato7 commented Jul 3, 2020

Faced similar issue within corporate network while trying to access internal registry from Windows host. Resolved it by removing the Proxy server configuration.
image

I had set proxy in Web Server section due to which only hub.docker.com was only accessible. If necessary to access registry with Proxy then add it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests