Docker Toolbox Tutorial Client.Timeout exceeded while awaiting headers
Asked Answered
B

9

16

I'm following the guide at https://docs.docker.com/get-started/part2/#publish-the-image

Throughout the guide I've had trouble with this error sometimes coming up and sometimes when I rerun the commands they will work.

docker push %username%/%repository%:%tag%

I will get a response of 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)

I'm using Windows Home with Docker Toolbox.

Please let me know if any additional information is needed.

Bream answered 19/10, 2017 at 3:26 Comment(0)
B
5

For anyone else who's looking I found the answer here which led me to here

Specifically for me these steps were helpful. In case the links break in the future.

This worked for Windows 10 Home/Docker Toolbox

  1. Right click on wifi icon on bottom right of the screen and open network and sharing center.
  2. Right click on the connection at "connections:"
  3. Click on Properties
  4. Uncheck IPv6
  5. Check IPv4
  6. Click properties
  7. Select radio button Use the following DNS addresses
  8. For preferred use 8.8.8.8
  9. Restart the computer and try again.
Bream answered 24/10, 2017 at 5:53 Comment(0)
H
13

Simply go to the Docker's Settings > Network and change DNS Server radio button to Fixed

enter image description here

Heliolatry answered 22/3, 2018 at 2:10 Comment(0)
S
10

Unfortunately answers above didn't help in my case, but restarting Docker did.

screen

Simple answered 16/4, 2018 at 20:1 Comment(2)
Using docker toolbox on win 8.1. Restart helped in this issue.Involute
Worked for me too, Windows 10 home, Docker toolbox.Vuong
B
5

For anyone else who's looking I found the answer here which led me to here

Specifically for me these steps were helpful. In case the links break in the future.

This worked for Windows 10 Home/Docker Toolbox

  1. Right click on wifi icon on bottom right of the screen and open network and sharing center.
  2. Right click on the connection at "connections:"
  3. Click on Properties
  4. Uncheck IPv6
  5. Check IPv4
  6. Click properties
  7. Select radio button Use the following DNS addresses
  8. For preferred use 8.8.8.8
  9. Restart the computer and try again.
Bream answered 24/10, 2017 at 5:53 Comment(0)
P
4

In case someone runs his own docker repo. I had a similar "Client.Timeout exceeded while awaiting headers" when running

docker login myownrepo.com:5000

It happened to be that i had port forwarding only for port 5000, and forgotten to add for port 5001. The issue was resolved by adding port 5001 (on my router) pointing to the same docker-repo-host.

Proportion answered 2/1, 2018 at 15:58 Comment(1)
saved my day. Many thanks. Gave me the hint to disable my firewall rules.Zygospore
C
2

Do not add proxy unless it is required to access registry. In my case behind corporate network, I had added proxy which resulted in timeout error, after removing the proxy configuration in Docker Desktop, it got resolved. Hope it helps somebody.

enter image description here

Collation answered 3/7, 2020 at 10:13 Comment(0)
J
1

"Client.Timeout exceeded while awaiting headers" is a symptom of several possible causes. In my case it was simply a case of the private network firewall blocking the docker client machine from accessing the registry host machine.

To test if that's the case (for whoever may be reading this), first try temporarily disabling the private network firewall.

For instance, if the private docker registry is hosted on Windows 10:

1) open Windows Security

2) click on Firewall & network protection

3) ensure Private Network is "active" and click on it

4) under "Microsoft Defender Wall" switch OFF private firewall

If the IP is suddenly accessible then you need to re-enable the firewall on the host and configure it to allow access to the docker registry.

Jandy answered 16/12, 2019 at 3:39 Comment(0)
S
1

My vpn was the cause, I turned it off and the problem went away

Salutatory answered 15/9, 2023 at 20:24 Comment(0)
M
0

I had this problem as I was using docker-reg:5000 under WSL2. Adding it to /etc/hosts did not work.

As docker really works under windows, you need to add it to the WINDOWS hosts file. C:\Windows\System32\drivers\etc\hosts

Millstream answered 3/10, 2021 at 23:39 Comment(0)
M
0

In my case having a slow and not stable internet connection was causing the issue. So if it is possible to increase performance of your connection do that, but in my case i retried it multiple times and it worked after a while.

Moidore answered 20/12, 2021 at 10:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.