You are not logged in.

#1 2019-05-24 14:51:40

Orionis
Member
Registered: 2018-01-19
Posts: 42

DNS lookup intermittent failure

Recently I've begun having the phenomenon where every time I need a DNS lookup done, it fails the first time, sometimes even the second time, after which it works as intended. I've noticed this using a simple ping to using pacman. Frankly, I don't quite know what is causing it, but it gets quite annoying, especially when installing using an AUR helper which needs to download files in between and fails because it only tries once.

The biggest change I've made to recent installations is trying to stick to the networking tools that come with the base group. In other words, I'm using networkd to set up the network (with static entries for IP, gateway and DNS) and resolved (with a symlinked resolv.conf). My internal DNS domain still uses a .local-suffix, but the search domains are correctly set and used (and that shouldn't be an issue with resolving external names as far as I know).

Other systems as well as older installations don't have this issue and I'm suspecting resolved is somehow involved.

I'm hoping this has been asked about before and the solution is already known.

Offline

#2 2019-05-24 17:25:32

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,769
Website

Re: DNS lookup intermittent failure

Orionis wrote:

I'm using networkd to set up the network (with static entries for IP, gateway and DNS) and resolved (with a symlinked resolv.conf).

Try deleting the symlink and maintaining a static resolv.conf instead.

I've had problems with the stub resolver, it handles resolv.conf in an unusual way:

https://github.com/systemd/systemd/issues/5755

Offline

#3 2019-05-24 21:58:02

Orionis
Member
Registered: 2018-01-19
Posts: 42

Re: DNS lookup intermittent failure

Head_on_a_Stick wrote:

Try deleting the symlink and maintaining a static resolv.conf instead.

I've had problems with the stub resolver, it handles resolv.conf in an unusual way:

https://github.com/systemd/systemd/issues/5755

Technically, it just sets itself as DNS resolver, right?

If I leave resolved disabled and use only resolv.conf, everything appears to work. So why would I use resolved?

Second, if I have resolved enabled but use a static resolv.conf, I still get resolution issues.

Last edited by Orionis (2019-05-24 21:58:26)

Offline

#4 2019-05-27 09:27:40

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,769
Website

Re: DNS lookup intermittent failure

Orionis wrote:

If I leave resolved disabled and use only resolv.conf, everything appears to work. So why would I use resolved?

Second, if I have resolved enabled but use a static resolv.conf, I still get resolution issues.

So don't use systemd-resolved then.

If you need a local nameserver then I can recommend unbound.

Offline

#5 2019-05-30 03:33:39

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: DNS lookup intermittent failure

Orionis wrote:

So why would I use resolved?

Because it's part of SystemD!
There's literally no need to ever install anything else because it does everything!
If you've found something it doesn't do which something else does then that's a bug. Please file a report!
But don't report bugs with shipping software, because it's that way by design and you're the real bug!

OK, the above is clearly sarcasm, but it also has a ring of truth and it's quite telling that a week has gone past and no-one can answer the pertinent question you asked.

Most often, libc resolver is just fine - if your local router runs a DNS cache.
You only need something more powerful if you need DNS for specific domains over VPN - then  libc is the poor choice and you need something like unbound + resolvconf.

Offline

Board footer

Powered by FluxBB