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

Error message :
PS C:\Users\Administrator> docker run hello-world
Unable to find image ‘hello-world:latest’ 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’.

OS : Windows server 2016 Datacenter evaluation edition

am trying to work with Docker on new Windows server 2016 with artcicle instructions "https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_server " but getting above error message while testing. what is wrong here.

PS C:\Users\Administrator> docker version
Client:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64

Server:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64

PS C:\Users\Administrator> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.2-cs2-ws-beta
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: nat null overlay
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.321.amd64fre.rs1_release_inmarket.161004-2338)
Operating System: Windows Server 2016 Datacenter Evaluation
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 8 GiB
Name: xxxxxxx
ID: MIZ7:JLWI:KSNO:GP6V:2TBI:ILZR:2CB5:ZLQC:RVZX:W7HX:5COJ:7VOC
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

Steps to reproduce the behavior

  1. … docker run hello-world
  2. … docker run docker run microsoft/sample-dotnet
1 Like

I have the same issue. This is on Windows Server 2016 Datacenter edition.

PS C:\Users\Administrator> docker run microsoft/sample-dotnet
Unable to find image ‘microsoft/sample-dotnet:latest’ 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’.

PS C:\Users\Administrator> [System.Environment]::OSVersion.Version

Major Minor Build Revision


10 0 14393 0

PS C:\Users\Administrator> docker version
Client:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64

Server:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64

The problem is now resolved after I connect docker VM to direct internet connection without any firewall.
hence I expect this problem inside Corporate Network. anyone who experienc this issue please connect VM to direct internet.

6 Likes

I am having the exact same problem from home office, no firewall no restrictions.Whatever I run, I get

Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connectio
n (Client.Timeout exceeded while awaiting headers)

configure your company proxy server inside powershell for docker.

##[Environment]::SetEnvironmentVariable(“HTTP_PROXY”, “http://proxyserver:port”, [EnvironmentVariableTarget]::Machine)"

And restart docker service : restart-service docker

And try pulling any container.

Regards,
Chethan Gatty

1 Like

I am at home office, no proxy, all my machines have direct internet access

1 Like

Yes, this has nothing to do with the firewall. I’m running none and it fails exactly the same way on macOS 10.12.2 and Docker 1.13.0.

1 Like

I am facing the same issue on Docker for Windows installed in my Windows 10 Enterprise Edition with 64-bit OS.
I am behind a corporate proxy but I have made necessary changes as mentioned in this doc under Network , Proxies

Does anyone have this issue solved on Docker for Windows installed on Windows 10 Enterprise Edition?

4 Likes

Hi! How do I make this change on Windows 10 Pro?

I can’t install powershell through docker, eg. “docker pull microsoft/powershell”, as directed elsewhere because the network doesn’t work.

If I download and run the separate .msi for Win 10… where do I find the program? There’s no indication where it is installed - or if it replaced the existing MS Powershell. (I can’t find ANYTHING in Win10)

When I do run that powershell… uh, what then? I understand your template-as-HTML-header, but what commands should I run / what setting / why isn’t this set in a .config file in the Docker directory??

Also: anything different if the proxy is defined by a .pac file?

Thanks…

I had the same error on Windows 8. It was fixed by following 2 advices! First restart docker and update environment

$ docker-machine restart default      # Restart the environment
$ eval $(docker-machine env default)  # Refresh your environment settings

This will create even more virtual connections in your Control Panel.
Next create an account @ hub.docker.com and log in docker in console:

$ docker login

Now you can pull images from hub.

25 Likes

Thanks, it worked for me.

1 Like

Docker is not working at that time. You should restart your docker server. If you’re in windows 10 pro, right click Docker icon on your task bar and click on settings menu item. Then restart docker.

My work computer is crashing my docker and I must restart it manually. When I forget to start it, I’ve got this error and fin this solution.

2 Likes

Hello Guys,

I must say this error looks suspicious but what I believe this error occurs because host (virtual) machine is not able to reach the docker repository or having connection issues. I was getting this error while I was trying to pull an image.

In my case, I was using HTTP proxy on my virtual box to connect to the internet.

HTTPS_PROXY=https://user_name:password@proxy_address:port/

I noticed my proxy password was having some special characters and it was malfunctioning the code compilation.

How did I get to know? I tried installing some package from Python PIP package Installer which exposed the code error more clear.

The solution for me: I updated my proxy password without special characters that are used in either in the regular expression or in host connection. Now everything works fine for me.

Best Regards,
Tayyab Khan

2 Likes

Thanks mate. This solved my problem.

Im still facing the below issue.

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)

Working on Windows 10.
Able to pull images from home, but while connected to office network/VPN facing this issue.

Please help me fix it. :frowning:

I fix it because I configed a proxy uncorrectly.

Hi,

export "HTTP_PROXY=http://PROXY:PORT"
export “HTTPS_PROXY=http://PROXY:PORT”

didn’t work for me, so I tried it in lowercase and without double quotes:

export http_proxy=http://xxx.xxx.xxx.xxx:ppp
export https_proxy=http://xxx.xxx.xxx.xxx:ppp

TaDa, the Internet access is working. :slight_smile:

Regards,
A.

2 Likes

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

setting proxying in home network where no proxy has been setup :frowning: , 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

ubuntu@ubuntuserver:~$ sudo systemctl daemon-reload #THIS IS RESCUE COMMAND…
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.

:slight_smile:

3 Likes

it worked for me , thanks man

1 Like

This worked for me. Well I switched my MobyLinuxVM to an external network virtual switch. I then restarted docker and it worked; but it changed my network back to DockerNAT. Weird…