colima: DNS names that can't be resolved in Colima, possibly only with gvproxy network driver
Description
I’m starting this issue so we can start to track down the specific DNS addresses that fail in colima/lima, and the sources of information. I get this question all the time, and tell people to use --dns 1.1.1.1
and it almost always fixes. But I think we should start to track what they are so maybe we can solve this someday.
Issue | hostname |
---|---|
https://github.com/drud/ddev/issues/4372 | mavtek-840225427682.d.codeartifact.us-east-1.amazonaws.com |
https://github.com/drud/ddev/issues/4413 | www.youtube.com (seems to be youtube-ui.l.google.com) |
https://github.com/abiosoft/colima/issues/466#issuecomment-1327977342 | test12345.s3.ap-northeast-1.amazonaws.com |
Version
Colima Version: Various Lima Version: Qemu Version:
Operating System
- macOS Intel
- macOS M1
- Linux
Workarounds
Many people have reported in the comments that changing to the slirp network driver resolved the issue.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 36 (11 by maintainers)
After some messing around, this seems to be the fix:
Change
gvproxy
toslirp
. With such a limitation/bug, I wonder why it’s not the default.@abiosoft https://wiki.musl-libc.org/functional-differences-from-glibc.html
Multiple reports on weird musl dns incompatibility with glibc. I think it is safer to use base image like debian for this.
I can add
sbp-plugin-binaries.s3.eu-west-1.amazonaws.com
If indeed using
slirp
as the network driver fixes it, this should be resolved by the next releasev0.5.0
.I hit this while running a container which does a lot of AWS service requests. DNS resolution would fail after some time when using
vz
vm, then subsequent run would fail almost immediately and onlycolima restart
helped to get more time without DNS failures. And withqemu
andslirp
network driver it was actually even worse. So I resorted to Docker Desktop which runs without problems. Sad.Hi! I started with
colima version 0.5.5
two months ago and changing the config + restart worked fine for me today (without deleting).@rfay just mentioned in DDEV discord the following:
So depends on how many updates happened in the meantime I guess?
@gpsa you’re making a bit of a mess of this issue. Could you please open one that’s on-topic for your issues?
I’ve observed sporadic failures with golang.org; I’m running on a 2021 Mac M1 Silicon using the vz virtualization driver. This manifests when using the devcontainer cli to build workspace images.
For me, after simply
restart
ing nothing seemed to be working. To be more specific, adocker build
failed right at the beginning, because it could not even resolveregistry-1.docker.io
. It was ani/o timeout
right there, suggesting all/most networking was broken in the VM. I got the idea for thedelete
from here.@abiosoft thank you so much, that worked like a breeze. Now both internal Docker DNS and external domains work just fine on
SLIRP
.@gpsa yeah. It’s a regression actually, used to work before. You can edit the
/etc/resolv.conf
file in the VM and set the nameserver IP to192.168.5.3
.In fact, it is the only entry in the file so you can simply replace it
Edited, thanks @renatho