colima icon indicating copy to clipboard operation
colima copied to clipboard

DNS resolution issues

Open AnthoBalitrand opened this issue 10 months ago • 1 comments

Description

I have DNS resolution issues from my colima VM for some time now (seems to be since last upgrade).

Example : While I'm able to resolve registry-1.docker.io from the host :

Server:		192.168.6.193
Address:	192.168.6.193#53

Non-authoritative answer:
Name:	registry-1.docker.io
Address: 98.85.153.80
Name:	registry-1.docker.io
Address: 44.208.254.194
Name:	registry-1.docker.io
Address: 3.94.224.37

I get no answer from the guest VM

; <<>> DiG 9.18.30-0ubuntu0.24.04.1-Ubuntu <<>> registry-1.docker.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 52058
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;registry-1.docker.io.		IN	A

;; Query time: 3004 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
;; WHEN: Tue Jan 28 18:50:34 CET 2025
;; MSG SIZE  rcvd: 49

As a result, no images can be downloaded (but it also impacts DNS generally, so impacting all containers service as soon as they need internet access)

docker container run --rm -it --name dns-test alpine sh
Unable to find image 'alpine:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 127.0.0.53:53: no such host.
See 'docker run --help'.

In the meantime, some other FQDNs work from the guest VM : ......

; <<>> DiG 9.18.30-0ubuntu0.24.04.1-Ubuntu <<>> auth.docker.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50208
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;auth.docker.io.			IN	A

;; ANSWER SECTION:
auth.docker.io.		41	IN	A	3.94.224.37
auth.docker.io.		41	IN	A	44.208.254.194
auth.docker.io.		41	IN	A	98.85.153.80

Version

colima version 0.8.1 git commit: 96598cc5b64e5e9e1e64891642b91edc8ac49d16

runtime: docker arch: aarch64 client: v27.3.1 server: v27.4.0 limactl version 1.0.3 qemu-img version 9.2.0 Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers

Operating System

  • [ ] macOS Intel <= 13 (Ventura)
  • [ ] macOS Intel >= 14 (Sonoma)
  • [ ] Apple Silicon <= 13 (Ventura)
  • [x] Apple Silicon >= 14 (Sonoma)
  • [ ] Linux

Output of colima status

INFO[0000] colima is running using QEMU INFO[0000] arch: aarch64 INFO[0000] runtime: docker INFO[0000] mountType: sshfs INFO[0000] socket: unix:///Users/to148757/.colima/default/docker.sock

Reproduction Steps

Expected behaviour

No response

Additional context

No response

AnthoBalitrand avatar Jan 28 '25 17:01 AnthoBalitrand

Add these into your NDS file /etc/resolv.conf: nameserver 8.8.8.8 nameserver 8.8.4.4

lipengjia1 avatar Jun 10 '25 13:06 lipengjia1