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

Dnsmasq stopping abruptly #199

Closed
kmskrishna opened this issue Jun 30, 2021 · 13 comments · Fixed by #208
Closed

Dnsmasq stopping abruptly #199

kmskrishna opened this issue Jun 30, 2021 · 13 comments · Fixed by #208

Comments

@kmskrishna
Copy link

kmskrishna commented Jun 30, 2021

Hello

I am running subspace in a docker and dnsmasq is also running in the docker. It was uninstalled in the host machine as mentioned in the docs.

I also added some internal domains to /etc/hosts. And the DNS resolution is working well when connected to the VPN.

Everything works as expected but randomly the DNS resolution stops. On restarting the docker container everything works normally again.

I got access to the docker shell using docker exec and inside the container, DNS is working fine. it is just that in the wireguard clients and the host, DNS resolution is stopping randomly.

dnsmasq is running when checked with ps aux | grep dnsmasq on the host system.

Expected behaviour

DNS should resolve normally every time.

Additional context
I am facing this issue right now with 2 different machines which are on AWS.

@kmskrishna
Copy link
Author

Is there a way to run dnsmasq on the host machine and disable it in the docker?

@gchamon
Copy link

gchamon commented Jun 30, 2021

hey @kmskrishna, currently there is only the option to disable dnsmasq along with DNS tunneling altogether. We haven't split that config into two. Maybe we could implement an override and you could configure DNS to be your server IP

@kmskrishna
Copy link
Author

Apart from that, I am encountering this issue a lot regularly, Any idea how to debug this. DNS works in docker but not on the host system. What might be the issue?

@gchamon
Copy link

gchamon commented Jun 30, 2021

do you think this is related to #141 ? Try #144 (comment)

@kmskrishna
Copy link
Author

hey @kmskrishna, currently there is only the option to disable dnsmasq along with DNS tunneling altogether. We haven't split that config into two. Maybe we could implement an override and you could configure DNS to be your server IP

Do you think doing this would solve the issue? I am running a wireguard/dnsmasq together without subspace and didn't face any issue. This makes me believe that this is a docker related issue. Not able to come up with a good way to debug it though. One way to do is to run dnsmasq outside the docker and test but that is not supported in subspace as of now.

@kmskrishna
Copy link
Author

do you think this is related to #141 ? Try #144 (comment)

It definitely sounds like #141 and I tried the solution mentioned in #144 will update you on how it works.

Can we concretely say if the issue is because of docker and dnsmasq? What test can we do to prove/disprove this?

@gchamon
Copy link

gchamon commented Jun 30, 2021

I am really in the dark here. I have little knowledge of dnsmasq and personally I use VPN across different countries so I have to disable dnsmasq. I don't have, therefore, real world experience with dnsmasq. @agonbar can you think of a way to test this?

@syphernl
Copy link

syphernl commented Jul 1, 2021

Could this be related to #194? Do you see anything in the docker logs for the subspace container?

@kmskrishna
Copy link
Author

@syphernl Docker logs show only this that mention dnsmasq

dnsmasq: started, version 2.80 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify dumpfile
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 1.1.1.1#53
dnsmasq: read /etc/hosts - 10 addresses
run: dnsmasq: (pid 54) 5s; run: log: (pid 52) 5s

@kmskrishna
Copy link
Author

do you think this is related to #141 ? Try #144 (comment)

It definitely sounds like #141 and I tried the solution mentioned in #144 will update you on how it works.

Can we concretely say if the issue is because of docker and dnsmasq? What test can we do to prove/disprove this?

I tried the fix mentioned in #144, it didn't work.

@gchamon
Copy link

gchamon commented Jul 2, 2021

One sanity check question. How are you launching subspace? Post here the compose config or docker command

@kmskrishna
Copy link
Author

One sanity check question. How are you launching subspace? Post here the compose config or docker command

Using the docker command line

 sudo docker create \
                    --name subspace \
                    --restart always \
                    --network host \
                    --cap-add NET_ADMIN \
                    --volume /data:/data \
                    --volume /etc/dnsmasq.d:/etc/dnsmasq.d \
                    --env SUBSPACE_HTTP_HOST="domain.com" \
                    --env SUBSPACE_DISABLE_DNS=true \
                    --env SUBSPACE_LISTENPORT="51820" \
                    --env SUBSPACE_ALLOWED_IPS="110.99.97.0/24" \
                    subspacecommunity/subspace:latest

Then

sudo docker start subspace

@gchamon
Copy link

gchamon commented Jul 2, 2021

We have an issue tracked in #193 . These shorthand tags are not working. Please use the long tags, for example amd64-v1.5.0

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

Successfully merging a pull request may close this issue.

3 participants