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

What worked for us is preventing network manager from modifying /etc/resolv.conf

remove this link:
/etc/resolv.conf -> …/run/systemd/resolve/stub-resolv.conf
and make resolv.conf a static file

only entry we have in /etc/resolv.conf
nameserver 8.8.8.8

/etc/NetworkManager/NetworkManager.conf
[main]
dns=none
rc-manager=unmanaged

You may also need to run a connection specific DNS config (might not be necessary)
nmcli con show
nmcli con mod ipv4.dns “8.8.8.8”
nmcli con mod ipv4.ignore-auto-dns yes
nmcli con down
nmcli con up

restart network manager and check resolv.conf to see that your changes are still in place.

1 Like