Docker Community Forums

Share and learn in the Docker community.

Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection

Hi Guys,

i installed docker on RHEL 7.6. Version of docker is 18.09.7.

When try to run first test command:

# docker run hello-world

I am getting error:

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

I am behind proxy, so i configured:

[root@xyz docker]# cat /etc/sysconfig/docker
HTTP_PROXY="http://myip:port_here"
HTTPS_PROXY="http://myip:port_here"
NO_PROXY="127.0.0.1,localhost,"
http_proxy="${HTTP_PROXY}"
https_proxy="${HTTPS_PROXY}"

And i am still getting this error.

When i run docker as daemon:
# dockerd

and then try again:
# docker run hello-world

i can see errors like:

WARN[2019-07-10T14:47:11.803738620+02:00] Error getting v2 registry: Get https://registry-1.docker.io/v2/: remote error: tls: handshake failure
INFO[2019-07-10T14:47:11.803771159+02:00] Attempting next endpoint for pull after error: Get samelink as above/: remote error: tls: handshake failure
ERRO[2019-07-10T14:47:11.803804450+02:00] Handler for POST /v1.39/images/create returned error: Get samelink as above/: remote error: tls: handshake failure

What can cause this errors? Thanks for any hint.

Problem solved: I had to add docker.io and docker.com on the proxy server in a squid.conf