DNS name resolution problems after upgrade to Ubuntu server 24.04
https://askubuntu.com/questions/1565335/dns-name-resolution-problems-after-upgrade-to-ubuntu-server-24-04
I rent two virtual servers at Strato. A few days ago I upgrade both machines via do-release-upgrade to Ubuntu 24.04 coming from 22.04.
On one machine everything works fine, on the other one I have DNS name resolution problems.
I found this question: DNS at systemd's 127.0.0.53 is ignoring some lookups and tried following the answer to that. I also had a look at https://wiki.ubuntuusers.de/systemd/systemd-resolved/
As far as I could say, the systemd-resolved looked like it should.
/etc/resolv.conf was a symlink to /run/systemd/resolve/stub-resolv.conf
in /etc/systemd/resolved.conf I had the same content as on the other server where it works fine:
[Resolve]
DNS=85.214.154.81
DNS=2620:fe::fe
FallbackDNS=85.215.236.86
But after the upgrade to 24.04 name resolution was just impossible. I changed DNS server addresses, I removed the symlink und recreated it. I checked if there is any other software triing to make dns, but there wasn't.
If I try to ping a domain like google.com I only get Temporary failure in name resolution
The only possibility I found to be able to have name resolution is to remove the symlink and instead make a plain file /etc/resolv.conf with nameserver 8.8.8.8 as the only content, other strato nameservers don't work there.
Then I can do apt update and upgrade and ping domains. But after a while without touching (I am not yet sure how long it takes, but it is less then 12 hours) name resolution again doesn't work. Even though systemd-resolved status says it runs, without failures. A restart of the service makes name resolution functioning again.
If I google for my problem, beneath the resolved things I mentioned above, most likely it is suggested I should check my netplan configuration. But there is no netplan configuration, beacuse netplan is not installed (on the other server, that doesn't have any problems, it is not installed either).
I checked local firewall, if there is anything outgoing blocked, but there isn't.
I reinstalled systemd-resolved.
On this server I am only hosting a nextcloud, nothing else happens on this server.
I am pretty sure I forgot some information you would need to help me and also forget to write soemthin I already tried as I invested multiple hours in this till now. I appreciate any hint and help with this.
The weirdest part for me is, that 8.8.8.8 as nameserver in /etc/resolv.conf works, other servers, that are reachable by there IP don't. And if I set the symlink and write 8.8.8.8 as nameserver in /etc/systemd/resolved.conf it doesn't work either. I sure miss somethin here, but I don't get what...
Thanks in advance.
Okay, again I did now:
resolvectl log-level debug
resolvectl query example.com
journalctl -u systemd-resolved -b0
The output of uname -a is (behind the hostname):
5.4.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 x86_64 x86_64 GNU/Linux