Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pull images from docker.io registry even after successful login (dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.100:47063->10.0.2.3:53: i/o timeout) #677

Open
amantur opened this issue Jan 7, 2022 · 11 comments

Comments

@amantur
Copy link

amantur commented Jan 7, 2022

I am trying to run nerdctl inside WSL 2 (Ubuntu 20.04). Everything is setup and running (following this guide: https://medium.com/geekculture/move-away-from-docker-now-and-utilize-wsl2-systemd-genie-containerd-with-nerdctl-d5f729dcf227). But I ran into problems when trying to pull any images.

nerdctl run -d httpd
docker.io/library/httpd:latest: resolving      |--------------------------------------|
elapsed: 9.9 s                  total:   0.0 B (0.0 B/s)
INFO[0010] trying next host                              
     error="failed to do request: Head \"https://registry-1.docker.io/v2/library/httpd/manifests/latest\": 
           dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: 
           read udp 10.0.2.100:47063->10.0.2.3:53: i/o timeout" host=registry-1.docker.io
FATA[0010] failed to resolve reference "docker.io/library/httpd:latest": failed to do request: 
      Head "https://registry-1.docker.io/v2/library/httpd/manifests/latest": 
      dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read 
      udp 10.0.2.100:47063->10.0.2.3:53: i/o timeout

I have performed successful login using nerdctl login --username <myuser> --password <mypwd> docker.io

How can I fix this?


nerdctl:

nerdctl version
Client:
Version: v0.15.0
Git commit: b72b5ca

Server:
containerd:
Version: v1.5.8
GitCommit: 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71

Containerd:

containerd --version
containerd github.com/containerd/containerd v1.5.8 1e5ef943eb76627a6d3b6de8cd1ef6537f393a71

OS:

Edition Windows 11 Pro
Version 21H2
OS build 22000.376
Experience Windows Feature Experience Pack 1000.22000.376.0

WSL 2 Kernel (Ubuntu 20.04)

uname -r
5.10.60.1-microsoft-standard-WSL2

PS:
I tried the following:

nerdctl --debug-full login
DEBU[0000] attempting v2 login to registry endpoint https://registry-1.docker.io/v2/
Login Succeeded

and just after that it still fails with same error.

@AkihiroSuda AkihiroSuda changed the title Unable to pull images from docker.io registry even after successful login Unable to pull images from docker.io registry even after successful login (dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.100:47063->10.0.2.3:53: i/o timeout) Jan 7, 2022
@AkihiroSuda
Copy link
Member

Perhaps a duplicate of #622 , but not sure.
(#622 only happens occasionally on CirrusCI)

Workaround: sudo nerdctl

@AkihiroSuda
Copy link
Member

Another potential workaround: enter the rootlesskit namespaces with containerd-rootless-setuptool.sh nsenter bash, and vi /etc/resolv.conf to use an alternative DNS such as 8.8.8.8

@amantur
Copy link
Author

amantur commented Jan 7, 2022

Thanks for tagging and replying @AkihiroSuda. It is not a connectivity issue.

@AkihiroSuda
Copy link
Member

slirp4netns process might have been killed accidentally, or you might have too old (< 0.4.0) slirp4netns in the $PATH?

@bmurphey
Copy link

I was having this same issue (although without attempting to log in), and changing the DNS resolver fixed it. Happy to help troubleshoot in any way I can.

nerdctl version 0.16.1
containerd github.com/containerd/containerd v1.5.9 1407cab509ff0d96baa4f0eb6ff9980270e6e620
uname -r: 5.10.16.3-microsoft-standard-WSL2

@amantur
Copy link
Author

amantur commented Feb 18, 2022

well, it was not dns, I would not be able to login if DNS is not working.

@navels
Copy link

navels commented Mar 26, 2022

I'm having the same problem with (co)lima but only with >2 cpus: abiosoft/colima#137

@JuanTorchia
Copy link

I was having the same problem and I solved it by restarting the daemon of docker

@licryle

This comment was marked as off-topic.

@sakthisunda
Copy link

Check if UDP port for 10.0.2.3:53 is blocked by firewall (likely) set in your setup. If yes, it will work after unblocking and remove/recreate the pod

@yaroslawww
Copy link

I was having the same problem and I solved it by restarting the daemon of docker

On debian based OS to restart docker you can run: sudo systemctl restart docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants