We can see in your logs (thanks for all your effort BTW) that the failing cases are exactly those which have: ... Server: 127.0.0.53 Address: 127.0.0.53#53 ...
That represents the switch to systemd-resolved. It might be worth to check (and if you want report) your output of: $ systemd-resolve --status I guess we can already switch this bug from bind9 to systemd, or at least add it. Now one weakness of systemd-resolved that I've seen in several other bug reports is that - IIRC- if you have multiple DNS servers it does "the first wins". So if you happen to have multiple DNS servers pushed via dhcp or other places what could happen is that one answers "SERVFAIL" before the other one could reply with a valid answer. Is your setup using such a multi-dns scenario? Info: - There were some fixes in NM for that (bug 1624317) but I'm not sure if there aren't ways to still hit this. - There are many, but one related upstream issue (for some context) is https://github.com/systemd/systemd/issues/6076 ** Also affects: systemd (Ubuntu) Importance: Undecided Status: New ** Bug watch added: github.com/systemd/systemd/issues #6076 https://github.com/systemd/systemd/issues/6076 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1862437 Title: Ubuntu 16.10 & later, & derivatives do not query the assigned DNS server Status in bind9 package in Ubuntu: New Status in systemd package in Ubuntu: New Bug description: Starting Ubuntu 16.10 resolution of LAN addresses fails. This name resolution failure is evident in every post 16.0 Ubuntu & derivative that I have tested. See below - which shows 16.04 resolves, 18.04 and Pop!_OS 19.04 fail, and other distros - Fedora 31, openSUSE Leap 15.1, and Debian GNU/Linux 10 (buster) - all resolve as expected. == Test Case == $ name=$(hostnamectl | grep "Static hostname:" | cut -d: -f2 | xargs) $ echo "${name}" $ hostnamectl | grep System $ hostnamectl | grep Kernel $ nmcli dev show | grep DNS $ nslookup "${name}" == Additional Information == Operating System: Ubuntu 16.04.6 LTS Kernel: Linux 4.4.0-170-generic IP4.DNS[1]: 192.168.3.2 Server: 127.0.1.1 Address: 127.0.1.1#53 Name: BGOWIKI01v Address: 192.168.3.60 ============================================================================ Operating System: Ubuntu 18.04.3 LTS Kernel: Linux 4.15.0-72-generic IP4.DNS[1]: 192.168.3.2 Server: 127.0.0.53 Address: 127.0.0.53#53 ** server can't find BGOWIKI01v: SERVFAIL ============================================================================ Operating System: Pop!_OS 19.04 Kernel: Linux 5.0.0-21-generic IP4.DNS[1]: 192.168.3.2 Server: 127.0.0.53 Address: 127.0.0.53#53 ** server can't find BGOWIKI01v: SERVFAIL ============================================================================ Operating System: Fedora 31 (Workstation Edition) Kernel: Linux 5.3.7-301.fc31.x86_64 IP4.DNS[1]: 192.168.3.2 Server: 192.168.3.2 Address: 192.168.3.2#53 Name: BGOWIKI01v Address: 192.168.3.60 ============================================================================ Operating System: openSUSE Leap 15.1 Kernel: Linux 4.12.14-lp151.28.36-default IP4.DNS[1]: 192.168.3.2 Server: 192.168.3.2 Address: 192.168.3.2#53 Name: BGOWIKI01v Address: 192.168.3.60 ============================================================================ Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-6-amd64 IP4.DNS[1]: 192.168.3.2 Server: 192.168.3.2 Address: 192.168.3.2#53 Name: BGOWIKI01v Address: 192.168.3.60 ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: dnsutils 1:9.11.3+dfsg-1ubuntu1.11 ProcVersionSignature: Ubuntu 4.15.0-72.81-generic 4.15.18 Uname: Linux 4.15.0-72-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.9 Architecture: amd64 CurrentDesktop: MATE Date: Sat Feb 8 17:36:28 2020 InstallationDate: Installed on 2019-12-22 (47 days ago) InstallationMedia: Ubuntu-MATE 18.04 LTS "Bionic Beaver" - Release amd64 (20180426) SourcePackage: bind9 UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/bind9/+bug/1862437/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp