Docker pull Intermittent TLS handshake timeout

I hit a TLS handshake timeout a number of times when doing a docker pull

> docker pull maven:3.3.9-jdk-8-alpine
3.3.9-jdk-8-alpine: Pulling from library/maven
627beaf3eaaf: Pulling fs layer
1de20f2d8b83: Pulling fs layer
3e00029ebfe3: Pulling fs layer
25c4d56785f5: Waiting
acd66eeabe19: Waiting
4385888ddcee: Waiting
3198c0a22214: Waiting
error pulling image configuration: Get https://docker-images-prod.s3.amazonaws.com/registry-v2/docker/registry/v2/blobs/sha256/dd/dd9d4e1cd9dba7e2c7a69a08b17983f785d8a0509476dfde610aa8494e084dc6/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIQF2R62EC73X2HOA%2F20170714%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170714T143752Z&X-Amz-Expires=1200&X-Amz-SignedHeaders=host&X-Amz-Signature=db8cd38ab0a2faadf90887f2b830705309920b72cdf9fa2d338376bb2856a34b: net/http: TLS handshake timeout

However, if I keep re-running the command it eventually pulls down the image successfully.

I’m on
Windows 10 Version 1607 and running using Command Prompt
Docker for Windows version 17.06.0-ce, build 02c1d87

FWIW, I had the same problem running docker inside VirtualBox on OSX. The error was intermittent but it made it very difficult to execute a sequence of pulls successfully.

My linux VM was configured to auto detect the proxy. I changed it to use a fixed proxy setting and the problem went away (I only tested a few times but all pulls did work :sunny:)

I am running Docker on Win10.

I get the same (net/http: TLS handshake timeout) and it doesn’t matter which image i try to pull. I am not behind a proxy and I have a tested 6MBps connection.
I have a Rpi on the same network and I have no problems with that. I changed the DNS on the Win10 adapter (DockerNAT) to match that which I found on the RPi. I also made sure the DNS setting for Docker running on windows was set right. But I don’t think it is a DNS problem be cause docker pull does start to pull the image layers. It just hangs and then spits out the “net/http: TLS handshake timeout”. This is really upsetting.

The internet seems to be littered with this issue.

I tried all solutions and not one worked. Maybe someone at Docker can address this???

Is there anyone how has a proven fix for this problem??

Thanks

1 Like

Hi,

I am facing same issue on centos 7 with docker 18.09, i am using corporate proxy and set the proxy settings according to the doc: https://docs.docker.com/config/daemon/systemd/

but it is not pulling any image and giving me below error, any fix/workaround for this issue ?

evel=error msg=“Handler for POST /v1.39/images/create returned error: Get https://registry-1.docker.io/v2/: proxyconnect tcp: net/http: TLS handshake timeout”

even docker login is giving me TLS handshake timeout error

Try running Command Prompt as Admin worked for me

error pulling image configuration: Get https://registry-1.docker.io/v2/mapbox/robosat/blobs/sha256:32ff85ca995473ca3348de97b7c24e11579986a40db28d1ec23e3e5facf964a8: net/http: TLS handshake timeout

what are the steps should i take to resolve this error
wifi speed is 50+mb

What worked for me was to use a different network interface. Instead of connecting through ethernet (wired), I switched to wifi. Problem solved.

I was on a fresh install of Raspbian Stretch, by the way.

Try using the command with sudo access ,it work for me!!!

Ok Eric. Please try the below solution, it got worked for me running docker desktop on windows 10.

  1. edit the host file located at C:\Windows\System32\drivers\etc\hosts
  2. update the ip address configured as below

192.168.112.67 host.docker.internal
192.168.112.67 gateway.docker.internal

to

127.0.0.1 host.docker.internal
127.0.0.1 gateway.docker.internal

re-start docker.
please let me know.