Docker Community Forums

Share and learn in the Docker community.

Docker pull results in "Request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

docker
dockerhub
#1

Issue type

– error
When trying to pull docker containers from I am confronted with this error:

Using default tag: latest
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)

OS version

Ubuntu 18.04 (bionic)

Docker version

Client:
Version: 18.09.4
API version: 1.39
Go version: go1.10.8
Git commit: d14af54266
Built: Wed Mar 27 18:35:44 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.4
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: d14af54
Built: Wed Mar 27 18:01:48 2019
OS/Arch: linux/amd64
Experimental: false

Steps to reproduce

Docker pull hello-world
.

I am not behind a proxy or vpn (which seems to be a problem in other posts I’ve seen about this error)

I have attempted to search for a fix but to no avail. service docker restart does not resolve the issue. I have found that adding “nameserver 8.8.8.8” to etc/resolv.conf temporarily resolves the issue, but resolv.conf is rewritten/updated to the old version automatically, so this is not an ideal solution. I have been able to pull docker images from docker hub on this computer and on my current network in the past, so presumably some setting was changed, causing this issue. Any help would be much appreciated! Thanks very much.

.

If it is relevant, here is output from docker info

Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 9
Server Version: 18.09.4
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-1035-oem
Operating System: Ubuntu 18.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 31.05GiB
Name: ###(redacted)###
ID: ###(redacted)###
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
WARNING: No swap limit support

#2

Same problem here using docker login on the shell:

> docker login
Authenticating with existing credentials...
Login did not succeed, error: 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)
#3

I have exactly the same issue. I’ve been using Docker for Windows for months without any issues and then suddenly i can’t download any image and i can’t login using “docker login”. Although i still can login using hub.docker.com. Restarting docker, resetting to factory defaults, reinstalling Docker for Windows, restarting windows, fixed DNS - none of those helped to solve this problem.

#4

I’m sorry it won’t help you guys. I’m using docker in Vmware Workstation 12 Pro on CentOs7 and reverted a snapshot back. This made it work for me.