Temporary failure in name resolution on Ubuntu server 22.04.3 LTS
gene heskett
gheskett at shentel.net
Mon Nov 27 22:18:03 UTC 2023
On 11/27/23 12:27, Jon LaBadie wrote:
> On Mon, Nov 27, 2023 at 03:25:40PM +0100, Bo Berglund wrote:
>> On Sun, 26 Nov 2023 21:33 +0100, Tom H wrote:
>>
>>> I read the ubuntu-users@ archives more or less weekly, and I've just
>>> seen your "resolv.conf" thread and your last post:
>>>
>>> https://lists.ubuntu.com/archives/ubuntu-users/2023-November/311569.html
>>>
>>> Your immediate problem can be solved by changing the "resolved"
>>> configuration since it's controlling "resolv.conf".
>>>
>>> Create "/etc/systemd/resolved.conf.d/bo.conf" [ feel free to name it
>>> something else :) ].
>>>
>>> $ /etc/systemd/resolved.conf.d/bo.conf
>>> [Resolve]
>>> DNS=the_nameservers_that_you_want_(space_separated)
>>>
>>> This should ensure that you get your nameservers in "resolv.conf".
>>
>> About the file to create:
>> Do you mean I should create *directory*
>> /etc/systemd/resolved.conf.d
>> and then place text file bo.conf inside that dir?
>>
>>> To investigate your network setup more generally, find out what
>>> networking packages are installed with:
>>>
>>> dpkg-query -W -f='${binary:Package}\n' | grep -E
>>> 'ifupdown|netplan|network-manager|resolv'
>>>
>>> On my laptop, this command lists:
>>>
>>> libnetplan0:amd64
> ....
>>> systemd-resolved
>>
>> When I try on the remote system I get this:
>> $ dpkg-query -W -f='${binary:Package}\n' | grep
>> -E'ifupdown|netplan|network-manager|resolv'
>
>
> You left out a space after -E
>
>
>> grep: updown|netplan|network-manager|resolv: No such file or directory
>>
>> So somehow my system does not really behave...
>>
>
> Assuming "systemd-resolved" is installed, check whether it is in use.
>
> $ systemctl status systemd-resolved
>
> I have it installed, but am not using it for my name resolution.
> So I get:
>
> $ systemctl status systemd-resolved
> ○ systemd-resolved.service - Network Name Resolution
> Loaded: loaded (/lib/systemd/system/systemd-resolved.service;
> disabled; vendor preset: enabled)
> Active: inactive (dead)
> Docs: man:systemd-resolved.service(8)
> man:org.freedesktop.resolve1(5)
>
> https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
>
> https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
>
>
> If you are using systemd-resolved for your DNS the reason
> /etc/resolv.conf says "do NOT edit" is because that package
> uses files in /etc/systemd. Specifically "resolved.conf"
> and "resolved.conf.d/*".
>
> In the latter directory one of my systems has a file
> "localdns.conf" containing:
>
> [Resolve]
> DNS=10.0.0.12 10.0.0.2 8.8.8.8
> FallbackDNS=9.9.9.9 Domains=jgcomp.com labadie.us jgcomp.org
>
>
Thank you Jon, you just bailed me out again. I've a 3d printer with dns
problems because I don't have one in my home system, its all hosts file
based. And not in my local networks /16 block.
Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
More information about the ubuntu-users
mailing list