moby: Error response from daemon: Get https://registry-1.docker.io/v2/

Description

I try to create a docker container from an image from docker hub.

Steps to reproduce the issue:

  1. docker run hello-world

Describe the results you received: I would expect docker to pull the image and create a container out of it.

Describe the results you expected: I got an connection timeout:

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).
See 'docker run --help'.

or sometimes that

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pulling fs layer
docker: error pulling image configuration: Get https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha256/48/48b5124b2768d2b917edcb640435044a97967015485e812545546cbed5cf0233/data?Expires=1490975964&Signature=OUmibCvoXIlDlmt-GF187GDtJySfLIHJdgfs~GTyzARgOPaVYLfU8kLKKFnS3NczD39-PtCdTxEMKmE0IigxpsmDQimidTyuqOIlac-wDGhrLPveHoKIUYZ9QP9hzzAvRyhci9wrsWJJkrsOz3ITUaNRDM3z9xHyyQi07WQGLiQ_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: dial tcp: lookup dseasb33srnrn.cloudfront.net on 192.168.65.1:53: read udp 192.168.65.2:55172->192.168.65.1:53: i/o timeout.
See 'docker run --help'.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Tue Mar 28 00:40:02 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Fri Mar 24 00:00:50 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.03.1-ce
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
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.13-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952 GiB
Name: moby
ID: B4O5:BZWR:JRKQ:ANPW:4FK4:ZS3Z:D3PV:7HUE:DADF:N3TJ:64MM:U5KQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 16
 Goroutines: 26
 System Time: 2017-03-31T15:40:24.66843988Z
 EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 5
  • Comments: 45 (4 by maintainers)

Most upvoted comments

may be you are behind a firewall/proxy server i was also behind my office firewall so i tried below steps which resolved this issue.

For setting up proxy for docker, please do the following:

  1. Create a systemd drop-in directory for the docker service: $ mkdir -p /etc/systemd/system/docker.service.d $ vim /etc/systemd/system/docker.service.d/http-proxy.conf Then add below content with proxy settings with it

[Service] Environment=“HTTP_PROXY=http://<allowed_proxy_ipv4_address>:<proxy_port_num>/”

  1. For HTTPS proxy server: $ vim /etc/systemd/system/docker.service.d/https-proxy.conf Then add below content with proxy settings with it

[Service] Environment=“HTTPS_PROXY=https://<allowed_proxy_ipv4_address>:<proxy_port_num>/”

  1. Flush changes execute: $ sudo systemctl daemon-reload

  2. Restart Docker: $ sudo systemctl restart docker

  3. Verify that the configuration has been loaded: $ systemctl show --property=Environment docker

on 192.168.65.1:53: read udp 192.168.65.2:55172->192.168.65.1:53: i/o timeout

IIRC there were some cases where DNS resolution failed on Docker for Mac, depending on the DNS server that was configured on the host;

Can you try if it works if you set 8.8.8.8 as DNS server in the daemon configuration? You can set this by providing a JSON configuration in the preference panel (under daemon -> advanced), e.g;

{ "dns" : [ "8.8.8.8", "8.8.4.4" ]}

I had same issue while setting up dockers for first time ever and tried on two Ubuntu Server (16.04.3 Xenial) VM’s in home network with same problem with pulling HELLO-WORLD image after fresh installing and after few days for digging in much promised post for setting proxy in home NETWORK and none of these works

setup proxing in home network where no proxy has been setup 😃, linux or windows or mac, proxy is same accross everywhere like internet 😃

#curl https://registry-1.docker.io/v2/ to see can get respose and setup credentials…

ubuntu@ubuntuserver:~$ docker pull hello-world
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)
ubuntu@ubuntuserver:~$ cat /etc/systemd/system/docker.service.d/http-proxy.conf
cat: /etc/systemd/system/docker.service.d/http-proxy.conf: No such file or directory
ubuntu@ubuntuserver:~$ sudo nano /etc/resolv.conf

#add these lines on top and above one for home router… nameserver 8.8.8.8 nameserver 8.8.4.4

#following command is must after updating resolv.conf…

ubuntu@ubuntuserver:~$ sudo systemctl daemon-reload 
ubuntu@ubuntuserver:~$ sudo systemctl restart docker
ubuntu@ubuntuserver:~$ sudo systemctl status docker
ubuntu@ubuntuserver:~$ docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
5b0f327be733: Pull complete
Digest: sha256:07d5f7800dfe37b8c2196c7b1c524c33808ce2e0f74e7aa00e603295ca9a0972
Status: Downloaded newer image for hello-world:latest
ubuntu@ubuntuserver:~$ docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.

😃 …

I had this issue caused by a bad login being saved.

docker logout fixed it

Started having this issue after upgrading the version. Resolved for me by logging out of DockerHub screen shot 2018-04-28 at 12 02 53 pm

docker pull hello-world.

I got this…

Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: rea d udp [::1]:41859->[::1]:53: read: connection refused

I fixed it by quitting Docker from the tray, then simply restarting it.

To resolve this issue just restart your docker machine

command: docker-machine restart

It worked for me.

Had this issue on ubuntu 14.04. Running the command sudo service docker restart worked for me

so many but not a single right one. people are answering without any understanding of the issue

Hm, no direct suggestions, but does look like a networking error in your setup

ping @djs55 any suggestions, or known issues on our side?

Restarting docker resolved issue