Docker 18.06 behind proxy on CentOS 7 giving proxyconnect tcp: net/http: TLS handshake timeout

I have latest Docker version 18.06.0 installed on CentOS 7.
My server is in a corporate network so using a proxy server to access the registry.
I have added proxy settings as per docker documentation.
But finally adding proxy settings in worked partially. i.e. now docker is using proxy to pull the image before it runs.

But now it fails giving following error:
$ sudo docker run hello-world
Unable to find image ‘hello-world:latest’ locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: net/http: TLS handshake timeout.

Also, the login fails:
$ sudo docker login --username=XXXX
Password:
Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: EOF

  1. My proxy is pretty fast. When I’m using it to download anything from the internet using wget or curl I see 90 to 100Mbps speed.
  2. Other applications utils on my machine such as yum are using this proxy perfectly and it works well.

Now I don’t know why only Docker has a problem in downloading the images.

The details of installation and configuration are as follow:

Version:
$ sudo docker version
Client:
Version: 18.06.0-ce
API version: 1.38
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:08:18 2018
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 18.06.0-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: 0ffa825
Built: Wed Jul 18 19:10:42 2018
OS/Arch: linux/amd64
Experimental: false

OS Version:
Description: CentOS Linux release 7.2.1511 (Core)
Release: 7.2.1511

Docker proxy config:
$ cat /etc/systemd/system/docker.service.d/https-proxy.conf
[Service]
Environment=“HTTP_PROXY=http://pqr.corp.xxx.com:8080”
Environment=“HTTPS_PROXY=https://pqr.corp.xxx.com:8080”
Environment=“NO_PROXY=localhost,127.0.0.1”

after adding this configuration I have already done
sudo systemctl daemon-reload
sudo systemctl restart docker

Looking for specific help.

I have gone through most of the posts on TLS Handshake Timeout issues but didn’t get any answer or suggestions working for me.
My proxy is fine and docker is using it. I don’t understand why it gets that nasty timeout.

Hi,

Even I face this problem after upgrading the docker to 18.06 in ubuntu. Is there any fix?
My proxy setting were proper as per the docker guideline documents.

Thanks,
Bala.

Hi,

I am also facing same issue. I am on corporate proxy and docker pull is giving me below error:
proxyconnect tcp: net/http: TLS handshake timeout"

any solution ?

1 Like

Hi,

I have the same problem on Docker 18.06.1-ce running on Debian.

Any solution?

I have the same problem with pull:

[root@localhost ~]# docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
d1725b59e92d: Pulling fs layer
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/4a/4ab4c602aa5eed5528a6620ff18a1dc4faef0e1ab3a5eddeddb410714478c67f/data?verify=1545918050-oEe2dNbxxHpv5E92JA2Knw5HHFo%3D: remote error: tls: handshake failure

No solution or reply from team docker on this.
I tried all options but no luck!

I didn’t find any solition on any of the other sites ike stackoverflow either. Seems like bug in docker.

Hi,

I was also facing same issue behind firewall. Follow below steps:
$ sudo vim /etc/systemd/system/docker.service.d/http_proxy.conf
[Service]
Environment=“HTTP_PROXY=http://username:password@IP:port/”

Don’t use or remove https_prxoy.conf file.

reload and restart your docker
sudo systemctl daemon-reload sudo systemctl restart docker
$ docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
1b930d010525: Pull complete
Digest: sha256:2557*********************************8
Status: Downloaded newer image for hello-world:latest

4 Likes

Worked for me in Ubuntu 16.04.6 !
Thanks

thanks, it works for my environment!

Really strange but worked as stated. :+1:
Env: Red Hat Enterprise Linux Server release 7.7 (Maipo)

Once I removed https_prxoy.conf file, I was able to run docker login. Thank you!

it works well for me ,thank you!

Thank you! IT worked for me as well.