Temporary failure in name resolution on Ubuntu server 22.04.3 LTS

Bo Berglund bo.berglund at gmail.com
Mon Nov 27 14:25:40 UTC 2023


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
> libnss-resolve:amd64
> netplan-generator
> netplan.io
> network-manager
> network-manager-config-connectivity-ubuntu
> network-manager-gnome
> network-manager-openvpn
> network-manager-openvpn-gnome
> network-manager-pptp
> network-manager-pptp-gnome
> openvpn-systemd-resolved:amd64
> python3-netplan
> 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'
grep: updown|netplan|network-manager|resolv: No such file or directory

So somehow my system does not really behave...

Please note that network-manager is *not* installed on the problem system:

$ apt policy network-manager
network-manager:
  Installed: (none)
  Candidate: 1.36.6-0ubuntu2
  Version table:
     1.36.6-0ubuntu2 500
        500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64
Packages
     1.36.4-2ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

This system is a migrated Ubuntu started in 2017 as Ubuntu 16:04 LTS and then
migrated
to 18-20-22 using do-release-upgrade.
What I think now is that maybe 16.04 did not use network-manager and on later
do-release-upgrades
it was not introduced, thus getting me to the situation I am in now...


> I don't use "netplan". I could if I wanted to be more
> "Ubuntu-traditional" but I've accumulated a bunch of NM connection
> files in "/etc/NetworkManager/system-connections" over the years that
> I don't want to migrate and test. I'll probably move them all at some
> point :(

------------------------------------

At my home I have an Ubuntu Server (no GUI) system similar to the one at the
overseas location
and this started out as Ubuntu 18.04 LTS and has been do-release-upgraded once
to 20.04.

In this system the network-manager check via apt responds differently:

$ apt policy network-manager
network-manager:
  Installed: 1.22.10-1ubuntu2.3
  Candidate: 1.22.10-1ubuntu2.3
  Version table:
 *** 1.22.10-1ubuntu2.3 500
        500 http://se.archive.ubuntu.com/ubuntu focal-updates/main amd64
Packages
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.22.10-1ubuntu1 500
        500 http://se.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

So here network-manager is actually installed (but I don't know if 18.04 came
with it or if it has been introduced by the upgrade to 20.04, though...

The questions now are:

What will happen if I install network-manager on my GUI-less remote server?
Will that make the DNS servers persist?

And why did it work up until last week when it suddenly removed the DNS servers?
Note: This also affects how apt works...


-- 
Bo Berglund
Developer in Sweden




More information about the ubuntu-users mailing list