[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Temporary failure in name resolution



On Wed 31 Mar 2021 at 18:28:52 (-0400), Dan Norton wrote:
> David Christensen wrote on Wed, 31 Mar 2021 13:49:56 -0700:
> 
> I would do 'apt-get update' and 'apt-get upgrade' ('autoremove',
> 'clean', etc.). Once apt-get(8) is done, I would revert the changes
> to /etc/resolv.conf and see if name resolution breaks or remains
> working. (I would test by renaming /etc/resolve.conf and rebooting.)
> 
> Here is what I did:
> # apt update
> # apt upgrade
> # apt autoremove
> # apt-get clean
> # cp /etc/resolv.conf /etc/resolv.confX
> # chattr -i /etc/resolv.conf
> ## to make resolv.conf *not* immutable
> # cat /etc/resolv.conf
> domain attlocal.net
> search attlocal.net

I don't recall your answering Alexander's question: what benefit are
you getting from those two lines? Do you have a number of machines
at home that are being placed in that domain, whose names you
resolve with att's help?

> nameserver 1.1.1.1
> nameserver 1.0.0.1
> nameserver 192.168.1.254

Yes, BT do this (use the highest host number rather than the lowest).

> Shutdown then power-on boot
> 
> ## rebooted with /etc/resolv.conf *not* immutable
> root@deb4:~# ping google.com
> ping: google.com: Temporary failure in name resolution
> root@deb4:~# cat /etc/resolv.conf
> domain attlocal.net
> search attlocal.net
> nameserver 192.168.1.254
> ## showing that /etc/resolv.conf has been clobbered

Normally, I would say that you'd expect that, because dhclient would
overwrite it with DHCP information returned from your router.

But we've a clue that your system is very different from, say, mine:

   '# systemctl status systemd-resolved
    shows it being active and "Processing requests...".'

and in a parallel thread "Moritz Kempe: DNS problems on Raspberry Pi 400
(Debian 10.9)" we saw:

   "hosts: files mdns4_minimal [NOTFOUND=return] dns mymachines"

which smells of nss-resolve and, hence, systemd-resolved.

I notice that   man nss-resolve   also mentions placing "resolve"
early in the hosts: line.

Now, I'm not saying that any of this last applies to your system, but
it does suggest that, because you're using systemd-resolved, some of
the advice being given by users who aren't, might not directly apply.
BTW we haven't seen your own nsswitch.conf.

> After restoring resolv.conf so that it looks like this:
> # cat /etc/resolv.conf
> domain attlocal.net
> search attlocal.net
> nameserver 1.1.1.1
> nameserver 1.0.0.1
> nameserver 192.168.1.254
> # chattr +i /etc/resolv.conf
> ## making it immutable
> 
> Rebooted and posted this.

If you're going to file a bug, I would first start by reading up on
systemd-resolved, and checking that your configuration matches what
that service expects. If that doesn't fix it, then I'd file the bug
against systemd-resolved, ie libnss-resolve. I'm not sure whether
that was in the point-release, but the DDs can always reassign it.

Cheers,
David.


Reply to: