Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection

Since yesterday out of nowhere I'm not able to pull images anymore. And I can't login into docker with docker login. The same error appears:

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 not behind any proxy and all of my docker container itself work well. I'm running it at home and the only reverse proxy I use is running in a container and can't be the reason.

Running on:

  • Ubuntu 18.04.4 LTS
  • Docker version 19.03.5, build 633a0ea
like image 736
CptDayDreamer Avatar asked Mar 19 '20 23:03

CptDayDreamer


4 Answers

This helped me:

sudo nano /etc/resolv.conf

Set the nameserver to 8.8.8.8.

Restart the docker demon.

sudo systemctl restart docker
like image 83
Dmitry Krivolap Avatar answered Oct 21 '22 11:10

Dmitry Krivolap


Try to update /etc/resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4
like image 30
Theo Avatar answered Oct 21 '22 13:10

Theo


I added nameserver 8.8.8.8 in all my worker nodes and the issue was resolved

like image 4
Sunil Varma Avatar answered Oct 21 '22 11:10

Sunil Varma


In my case, it gets resolved after configuring the proxy. I am using Windows Docker (Refer 'Proxy Configuration' section from here for more details)

like image 2
Naren Chejara Avatar answered Oct 21 '22 11:10

Naren Chejara