nextdns / nextdns

NextDNS CLI client (DoH Proxy)
https://nextdns.io
MIT License
3.17k stars 192 forks source link

Losing internet connection will cause NextDNS client on Linux to hang #132

Closed kennyluk closed 1 year ago

kennyluk commented 4 years ago

Running the client on Ubuntu 18, nextdns 1.4.36

If the internet connection was lost, the client will hang, or take an reasonable amount of time to recover. running 'systemctl restart nextdns' is the only way to fix it.

No log result. (is there a way to enable logging?)

rs commented 4 years ago

Use log-queries. What do you get for sudo nextdns log.

kennyluk commented 4 years ago

Ok thanks, this happens every ~48 hours, will report when it recurs.

kunickiaj commented 4 years ago

I'm seeing some similar behavior on a UniFi USG. Every day or two DNS just stops working. Will enable query logging. No names are being resolved after a certain point in time or event, but unclear what that event is. End up having to restart the service.

rs commented 4 years ago

For ubuntu, can you try disabling systemd-resolved and point your /etc/resolv.conf to 127.0.0.1 instead of 127.0.0.53?

kunickiaj commented 4 years ago

image

Here's some of what I see -- drop of DNS queries hits zero until I run nextdns restart

From devices, queries timeout. This is EdgeOS (UniFi version) that does have dnsmasq enabled.

There is nothing of note in the NextDNS client logs (no timeouts or queries or anything else)

rs commented 4 years ago

@kunickiaj I think your problem is different from the one described in this ticket. Next time it happens, open https://test.nextdns.io and make sure the status is ok and client is nextdns-cli. If not, something is getting unconfigured. Check that your host is still using your router IP as DNS and that nextdns is still the process listening on port 53.

kunickiaj commented 4 years ago

Thanks, I will try that next time it does, but I don't think it'll yield anything as name resolution just seems to hang. I'm not sure if its dnsmasq related or nextdns-cli related yet (though didn't start having the issue until I started using nextdns-cli). Killing and restarting the process seems to resolve the issue for about a day or so. I'll see if I can generate any other trace information.

cesarvspr commented 3 years ago

Still facing this, very annoying, the restart command don't work always and take very long to the dns come back to live.

The test.nextdns.io don't show nothing.

The log files just show that network ir unreachable for some reason. But network is good outside ubuntu.

agucova commented 2 years ago

I've been having this problem for months (and I keep nextdns updated). I've made an alias to sudo nextdns restart and I now have muscle memory to trigger it whenever I change networks. Not great.

vincentbernat commented 2 years ago

@agucova Which OS are you running? What is the content of /etc/resolv.conf? If it happens, could you run systemctl kill -s QUIT nextdns and look at journalctl -u nextdns and post the generated backtrace here?