-
Notifications
You must be signed in to change notification settings - Fork 74
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
Hostnames fail to resolve #63
Comments
yeah, same issue here. I can't
|
I can't reproduce it on Docker Desktop Windows v25.0.3 using WSL2. Are you using something other host OS? |
Host OS is arch Linux |
I'm also on Arch Linux. Maybe our issue is related to #55 |
Also just ran into this on Fedora Linux using a fresh pull of
|
I “solved” the problem. By rolling back the commit 15a788b . By building a docker image.
Run it like this:
The most important thing I forgot to write resolving domains works. At least so than nothing. Temporary solution to who needs a very termux in the docker. |
Thanks 💙 I'll try that out the next time I need this again. |
TL;DRThe root cause is how dnsmasq behaves with too lax limits for open files. You can mitigate this issue by explicitly restricting the number of open file descriptors for the container. For example:
Longer explanationI also run into this issue on Arch Linux with Docker v26.1.4. The dnsmasq process ( Next I tested with Ubuntu 24.04 both with the Canonical packaged Docker v24.0.7 and the latest community edition of Docker v26.1.4. Everything worked fine on Ubuntu on both Docker versions. Because the same Docker version produced different behaviour in Arch and Ubuntu, something in Arch must have been different.
Then I tried
Turns out In Arch, you can see the current limit in the Termux Docker container with:
And if you run the same when the host OS is Ubuntu:
So by default, Arch is using a much larger limit for open file descriptors. And that's why dnsmasq hangs because it tries to close all of them. These limits originate most likely from the default kernel parameters:
If you don't want to change the kernel parameters, you can just restrict them for the termux-docker container. For example, to use the default limits of Ubuntu's kernel:
Now the container's dnsmasq does not hang any more in Arch Linux. FixA possible fix could be adding something modest, such as |
All hostnames fail to resolve inside the container. I have verified it has connection since I can run
curl 1.1.1.1
but tryinghttpbin.org/ip
fails.dnsmasq
starts but seems to be stuck since it just eats all of my CPUThis was the command used to start the container using docker v24.0.7
The text was updated successfully, but these errors were encountered: