Seeking Help with "net/http: request canceled (Client.Timeout exceeded while awaiting headers)" Error on Docker Login


I am configuring a Docker Registry using Nexus Repository Manager and have successfully been able to query the registry’s catalog using API calls. I used the following curl command to query the registry’s catalog on port 8086:

bashCopy code

curl -X GET http://<Nexus-Server-IP>:8086/v2/_catalog

This command successfully responds, providing the expected result. However, when attempting to log in to the same server using the Docker client, I encounter the following error message:

Error response from daemon: Get https://<Nexus-Server-IP>:8086/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

The docker login command used was:

docker login -u <username> -p <password> <Nexus-Server-IP>:8086

Here, <username>, <password>, and <Nexus-Server-IP> have been substituted with my username, password, and the IP address of the Nexus server, respectively.

  • The version of Nexus Repository Manager in use is 3.66.
  • The Docker client version I am working with is 24.06.
  • All requests have been made from within a WSL (Windows Subsystem for Linux) environment.

While the API call using curl operates correctly, attempting a docker login results in a connection failure due to a timeout. I would greatly appreciate any insights into the cause of this issue and potential solutions. Please let me know if there is additional information I can provide.

Thank you.

The only suggestions I can think of:

  • Docker client requires HTTPS for logins and at least your curl is http.
  • If Nexus is running on the same Windows host as WSL the default Windows firewall settings will not allow the connection.