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

For me it worked after proxy policies were updated, it was not a docker problem

I cannot delete my private or public repository from docker hub

When i trying to delete public or private repository from docker hub i got error

Command which i was trying to delete from terminal
curl -s -v -H “Authorization: JWT ${HUB_TOKEN}” -X DELETE “https://hub.docker.com/v2/repositories/mohd/test2/”

After execute i got error
image
Mark bundle as not supporting multiuse
< HTTP/1.1 401 UNAUTHORIZED
< Date: Tue, 14 Jul 2020 08:42:48 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Vary: Cookie

  • Connection #0 to host hub.docker.com left intact
    {“detail”: “Authentication credentials were not provided.”}

For me the solution was to switch to another wifi network

This worked here! Thanks

In my case, setting the proxy configuration in the Docker systemd service file worked as mentioned in https://docs.docker.com/config/daemon/systemd/#httphttps-proxy
I am using the docker in a ubuntu machine under corporate setting.

I’ve implemented the proxy conf fix before, and found it to give me problems on another internet connection. I had to remove the proxy line from /etc/systemd/system/docker.service.d to fix the issue again

Original fix:

# File: /etc/systemd/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=208.123.76.34:8080"
Environment="NO_PROXY=localhost,127.0.0.1"

Updated fix on a new internet connection:

# File: /etc/systemd/docker.service.d/http-proxy.conf
[Service]
Environment="NO_PROXY=localhost,127.0.0.1"
1 Like

If you’re running on macOS Big Sur, disable “Use new virtualization framework” within “Experimental Features.”

2 Likes

Thank you. It works for me

Thanks! This worked here. :slight_smile:

For me it was my own fault.

I’d been setting up pihole in Docker in Mac, and I’d set DNS on the Mac to look at an incorrect IP. Everything else appeared to be working, but when I checked my DNS seeings and then changed them to my pihole’s correct IP, everything worked correctly.

For MacOS BigSur the proxy breaks docker push.

The error is:

Get “https://gcr.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

The same fix can be achieved by disabling Manual proxy configuration in Resources → PROXIES

I was also facing the same issue.
Then I restarted the docker by command sudo systemctl restart docker and then again tried docker pull hello-world and then it worked. I think whenever you face this issue you should try to restart docker first or do as per given in this docker configuration doc.

Same problem with docker login, close session in docker desktop, change password in docker hub, and try docker login in CLI again, that works for me!

Thx, you saved my day.