Sunday, March 9, 2025

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)

While trying to pull a Docker image, the docker pull command was stuck forever without any progress or error.

System Details:

  • Windows 10
  • WSL 2 - Ubuntu
  • Docker Desktop 4.38.0

Issue Faced:


Running docker pull was stuck indefinitely.


Trying to log - docker login -u <username> in using the command prompt failed with this error:
"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)" 

Even signing into Docker Desktop was not successful.

Login on Docker Hub via browser was working fine, but Docker Desktop was not picking up the login session.

I followed different forums and applied multiple configuration suggestions, including adjusting nameserver settings inside /etc/resolv.conf, but nothing worked.

Also, WSL 2 networking was working fine otherwise — only Docker commands were impacted.

Resolution:

Finally, the issue got resolved after upgrading Docker Desktop to the latest version (4.39.0).
(Older versions may also work — I tried with 4.35.1, and it worked as well).



No comments:

Post a Comment