Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
c0nscience opened this issue Mar 31, 2017 · 37 comments
Closed

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

c0nscience opened this issue Mar 31, 2017 · 37 comments

Comments

@c0nscience
Copy link

@c0nscience c0nscience commented Mar 31, 2017

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
@anonymuse

This comment has been minimized.

Copy link

@anonymuse anonymuse commented Mar 31, 2017

Hi there -- it seems that Docker is doing the intended behavior:

I would expect docker to pull the image and create a container out of it.

but is failing due to network issues or other insufficient error handling. Am I reading that correctly?

@thaJeztah

This comment has been minimized.

Copy link
Member

@thaJeztah thaJeztah commented Mar 31, 2017

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" ]}
@c0nscience

This comment has been minimized.

Copy link
Author

@c0nscience c0nscience commented Apr 1, 2017

@thaJeztah I got still the same result. One time it has worked, I guess it was a bit faster so the timeout could not kick in, but each time I get the same errors:

~ » docker run hello-world                                                                                                                                                                       bherzig@Apollo
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=1491041188&Signature=Jr3KMnmwQAa0yeVBYc8rUdmCIMKcnsEKEy7jdegVZszObtBGipfMes97yZXtiwH9Jgm6e9sWKljWxNbqw-4Z7ntyjLnVYfsXXq~dz-DVH1wyqChk3czgh5UFXecZAFje6zgH6XEo4SpZjQ37XLmE70enZmNDa1INZQSiwyeqhgQ_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: dial tcp: lookup dseasb33srnrn.cloudfront.net on 192.168.65.1:53: read udp 192.168.65.2:54870->192.168.65.1:53: i/o timeout.
See 'docker run --help'.
~ » docker run hello-world                                                                                                                                                                       bherzig@Apollo
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'.
@thaJeztah

This comment has been minimized.

Copy link
Member

@thaJeztah thaJeztah commented Apr 1, 2017

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

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

@c0nscience

This comment has been minimized.

Copy link
Author

@c0nscience c0nscience commented Apr 1, 2017

@thaJeztah yeah you are right. I've tried to download the hello world image from a LTE connection and not from the internet connection in my flat and it worked.
Hmm that is strange, I have a quite good internet connection and it has worked in the past.
Do you know how to figure out why it is not working from my normal internet connection?

Addition:
downforeveryoneorjustme.com yields it is just down for me, if I'm connected to my wifi and the normal internet connection of the telekom (germany).

Oh wait I just saw that I now get another error, while trying to download the image:

~ » docker run hello-world                                                                                                                                                                       bherzig@Apollo
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: server misbehaving.
See 'docker run --help'.

Update:
Ok I tried another thing. I installed the Docker Toolbox on my Window 10 desktop machine and it worked there. I don't get it why that works but it does. It does take a while, which is weird, but at the end the hello-world image is pulled and the container was started.
Is it somehow possible, that the route from my ISP connection is longer than through the of my cellphone provider and with a bit more lag via wifi I got those timeouts?
But why is the route that fucked up then?

@c0nscience

This comment has been minimized.

Copy link
Author

@c0nscience c0nscience commented May 8, 2017

I'll close that one here, because I've created a new ticket in the correct project: docker/for-mac#1601

@mscomnet

This comment has been minimized.

Copy link

@mscomnet mscomnet commented Oct 16, 2017

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.

:) .....

@julianrosebury

This comment has been minimized.

Copy link

@julianrosebury julianrosebury commented Oct 27, 2017

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.

@1605200517

This comment has been minimized.

Copy link

@1605200517 1605200517 commented Oct 29, 2017

@mscomnet confirm that this works in a home proxyless network! resolv.conf was there but adding those two lines works for me on all machines!

@souravpatnaik

This comment has been minimized.

Copy link

@souravpatnaik souravpatnaik commented Oct 31, 2017

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

@Rohit2387

This comment has been minimized.

Copy link

@Rohit2387 Rohit2387 commented Jan 22, 2018

Hi,
I am geting below error while i am deploying image through kubectl .directly running in docker it is coming up.Can you please let me know the reason.
Failed to pull image "postgres": rpc error: code = Unknown desc = 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)
Error syncing pod

@souravpatnaik

This comment has been minimized.

Copy link

@souravpatnaik souravpatnaik commented Jan 23, 2018

@Rohit2387 , your machine is not able to reach the docker repository or having connection issues, try with diff. proxy or without proxy..
#]kubectl run postgres-image --image=postgres:latest
deployment "postgres-image" created
#]kubectl describe pod postgres-image-769495274-8n3dd

Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message


7m 7m 1 default-scheduler Normal Scheduled Successfully assigned postgres-image-769495274-8n3dd to host-10-19-170-244
7m 1m 6 kubelet, host-10-19-170-244 spec.containers{postgres-image} Normal Pulling pulling image "postgres:latest"
6m 1m 6 kubelet, host-10-19-170-244 spec.containers{postgres-image} Normal Pulled Successfully pulled image "postgres:latest"
6m 1m 6 kubelet, host-10-19-170-244 spec.containers{postgres-image} Normal Created Created container
6m 1m 6 kubelet, host-10-19-170-244 spec.containers{postgres-image} Normal Started Started container

for Error syncing pod.. , if you able to pull postgres image in your machine successfully, then try to create postgres pod using a yaml file, you should be careful about liveness and readiness probe to avoid this syncing pod error ..

@tcbabu

This comment has been minimized.

Copy link

@tcbabu tcbabu commented Feb 7, 2018

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

@maa105

This comment has been minimized.

Copy link

@maa105 maa105 commented Feb 12, 2018

any updates? im behind corporate proxy, I tried using proxifier wich works for nodejs connections but with no luck, also tried HTTP_PROXY, HTTPS_PROXY and PROXY in environment variables nothing works. I'm just trying the hello world container nothing fancy here:
docker run microsoft/dotnet-samples:dotnetapp-nanoserver
Unable to find image 'microsoft/dotnet-samples:dotnetapp-nanoserver' locally
C:\Program Files\Docker\docker.exe: 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 'C:\Program Files\Docker\docker.exe run --help'.

@veresh

This comment has been minimized.

Copy link

@veresh veresh commented Feb 15, 2018

Steps told by @souravpatnaik worked for me.
You need to create http proxy file and add the proxy server.

@qiangli

This comment has been minimized.

Copy link

@qiangli qiangli commented Apr 18, 2018

It could be a "red herring". Tried all the "solutions" - reinstall/mess with dns - still failing. After some time, tried again and it magically started working again.
I believe either docker service or my network was temporarily down. So wait it out is another solution.

@montao

This comment has been minimized.

Copy link

@montao montao commented Apr 23, 2018

Tried all the "solutions". Nothing works. This software is not mature. It should be able to configure behind proxy or firewall but no. Nothing work.

@garnetb

This comment has been minimized.

Copy link

@garnetb garnetb commented Apr 28, 2018

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

@tiotsop01

This comment has been minimized.

Copy link

@tiotsop01 tiotsop01 commented May 6, 2018

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

@faiferjulia

This comment has been minimized.

Copy link

@faiferjulia faiferjulia commented Jun 8, 2018

I had the same problem on my mac sierra , solved the issue by disable ipv6. It woks again!

@tjb7

This comment has been minimized.

Copy link

@tjb7 tjb7 commented Jun 20, 2018

I fixed this issue this way (Windows 10). I did the following:
(1) set the DNS server to 8.8.8.8 in the docker configuration menu
(2) ensured I had no proxy enabled (Search: Configure Proxy Settings, click LAN settings)
(3) restarted my machine

It is worth noting that when I do enable a proxy, I must change the docker configuration to DNS Server-Automatic

@Eltayeb-Karrar

This comment has been minimized.

Copy link

@Eltayeb-Karrar Eltayeb-Karrar commented Jul 11, 2018

if you use windows go to docker icon in taskbar and right click and switch to windows container

@sashasimkin

This comment has been minimized.

Copy link

@sashasimkin sashasimkin commented Jul 16, 2018

Still happening on 18.03.1.ce-3.fc28

$ uname -a
Linux 4.17.5-200.fc28.x86_64 #1 SMP Tue Jul 10 13:39:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I've changed DNS, played with network interfaces, re-installed docker with cleaning up directories(/var/lib/docker) and docker0 network. All with no luck.

However, If I start it as sudo dockerd - networking works as expected, i.e. docker run hello-world completes with message from the container.

@thaJeztah

This comment has been minimized.

Copy link
Member

@thaJeztah thaJeztah commented Jul 16, 2018

@sashasimkin wondering if it's related to docker/libnetwork#2187 / docker/libnetwork#2232. Also, if manually starting dockerd (not through systemd) works; check your systemd unit-file / configuration to see if there's possibly an option set that may interfere with networking (e.g. HTTP_PROXY environment variables, or other options)

@trillianjose

This comment has been minimized.

Copy link

@trillianjose trillianjose commented Jul 17, 2018

@mscomnet thank you your answer solve my problems on Ubuntu.

@sashasimkin

This comment has been minimized.

Copy link

@sashasimkin sashasimkin commented Jul 18, 2018

@thaJeztah Doesn't seem like it is :(

I've checked that both google DNS are reachable:

$ dig github.com @8.8.4.4

; <<>> DiG 9.11.3-RedHat-9.11.3-12.fc28 <<>> github.com @8.8.4.4
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2352
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;github.com.			IN	A

;; ANSWER SECTION:
github.com.		36	IN	A	192.30.253.113
github.com.		36	IN	A	192.30.253.112

;; Query time: 44 msec
;; SERVER: 8.8.4.4#53(8.8.4.4)
;; WHEN: Wed Jul 18 21:38:11 EEST 2018
;; MSG SIZE  rcvd: 71

$ dig github.com @8.8.8.8

; <<>> DiG 9.11.3-RedHat-9.11.3-12.fc28 <<>> github.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3619
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;github.com.			IN	A

;; ANSWER SECTION:
github.com.		59	IN	A	192.30.253.112
github.com.		59	IN	A	192.30.253.113

;; Query time: 78 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Jul 18 21:38:15 EEST 2018
;; MSG SIZE  rcvd: 71

I've also had 1.1.1.1 and 1.0.0.1 in resolv.conf
Now it looks like:

$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 192.168.31.1
nameserver 1.1.1.1
nameserver 8.8.8.8

systemd unit doesn't have any proxy-related settings in it

# systemctl show docker | grep -i proxy
#

I even tried commenting out everything but ExecStart and ExecReload in /usr/lib/systemd/system/docker.service (with daemon-reload and restart docker after each edit) to no avail :(


Do you know if there's a way to know what DNS docker is using for that request?

@amandalmia14

This comment has been minimized.

Copy link

@amandalmia14 amandalmia14 commented Jul 19, 2018

@ALL
@souravpatnaik
Just an info.
The proxy doesn't work for the latest version '18.06.0ce3-0~ubuntu', however its working seamlessly in older version.

@frankh

This comment has been minimized.

Copy link

@frankh frankh commented Jul 31, 2018

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

docker logout fixed it

@amandalmia14

This comment has been minimized.

Copy link

@amandalmia14 amandalmia14 commented Jul 31, 2018

@frankh Could you please tell us how did you fixed it?
Thanks

@sashasimkin

This comment has been minimized.

Copy link

@sashasimkin sashasimkin commented Jul 31, 2018

Re-installing docker-ce helped with my problem, tho I haven't found out what exactly was the cause :(

I wasn't logged into any registry, and DNS was 8.8.8.8/1.1.1.1 always.

@wagnermarques

This comment has been minimized.

Copy link

@wagnermarques wagnermarques commented Aug 1, 2018

In my case It was a typo in /usr/lib/systemd/system/docker.service because I am behind a proxy

[Service]
Type=notify
Environment="HTTP_PROYX=...
Environment="HTTPS_PROYX=...
Environment="FTP_PROYX=...
Environment="ALL_PROYX=..

To fix it:

  1. Fix the typo
  2. systemctl daemon-reload
  3. systemctl restart docker
@hitzhangjie

This comment has been minimized.

Copy link

@hitzhangjie hitzhangjie commented Oct 1, 2018

I reinstall docker new version .... it works.

@Applicafroguy

This comment has been minimized.

Copy link

@Applicafroguy Applicafroguy commented Jan 26, 2019

Restarting docker resolved issue

@haris-git-hub

This comment has been minimized.

Copy link

@haris-git-hub haris-git-hub commented May 6, 2019

To resolve this issue just restart your docker machine

command:
docker-machine restart

It worked for me.

@carljdp

This comment has been minimized.

Copy link

@carljdp carljdp commented Jul 18, 2019

On Windows: Uninstall / reinstall solved it for me (+ setting proxy settings if on corporate network)

@Gunmx

This comment has been minimized.

Copy link

@Gunmx Gunmx commented Oct 12, 2019

Hello,I sometimes use “$docker search php",
it will return
"Error response from daemon: Get https://index.docker.io/v1/search?q=php&n=25: net/http: TLS handshake timeout."I have change the Registry Mirrors(aliyun).But sometimes it very fast when i use "docker pull ...".
what should i do, please?

@thaJeztah

This comment has been minimized.

Copy link
Member

@thaJeztah thaJeztah commented Oct 13, 2019

The search API used is specific to Docker Hub, and (I don't think) registry-mirrors will be used for that.

Please keep in mind that the GitHub issue tracker is not intended as a general support forum,
but for reporting bugs and feature requests. For other type of questions, consider using one of;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.