Systemd-resolved fritzing

Hello,

I just did a fresh Plasma 6 Slim install today.

Desktop is the stock KDE.

I went to do an update after installation with “sudo dnf clean all” and “sudo dnf --allowerasing distro-sync” and it timed out with:

OpenMandriva Rolling - x86_64                                                                                 0.0  B/s |   0  B     06:00    
Errors during downloading metadata for repository 'rolling-x86_64':
  - Curl error (28): Timeout was reached for http://mirror.openmandriva.org/rolling/repository/x86_64/main/release/repodata/repomd.xml [Resolving timed out after 30001 milliseconds]
  - Curl error (28): Timeout was reached for http://abf-downloads.openmandriva.org/rolling/repository/x86_64/main/release/repodata/repomd.xml [Resolving timed out after 30001 milliseconds]
Error: Failed to download metadata for repo 'rolling-x86_64': Librepo was interrupted by a signal
Ignoring repositories: rolling-x86_64

So, a DNS resolution problem. Odd …

So I tried pulling those XML file in the browser. They eventually pulled but it took a while.

Ok, so I backed up and tried nslookup on one of the hostnames and got:

nslookup mirror.openmandriva.org
Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
Name:   mirror.openmandriva.org
Address: 140.211.11.99
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; communications error to 127.0.0.53#53: timed out
;; no servers could be reached

Then I found where OM is using systemd-resolved which runs a “stub” server at 127.0.0.53 and does its DNS management from there. Ok … odd but fine. I’m sure there’s a good reason.

I temporarily commented out 127.0.0.53 in /etc/resolv.conf and put in 8.8.8.8 for the nameserver and nslookups did fine then. The browser lookups were still extremely slow but browsers cache name resolution settings themselves often. I put the default settings back in /etc/resolv.conf and still have the same behavior.

Any ideas on why it would be giving an answer to the IP address query then start timing out in the same request?

Any insignts would be appreciated.

Add --refresh to the distro-sync command. Every single time.

Is systemd-resolved running and enabled?

Yes

systemctl status systemd-resolved
● systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/usr/lib/systemd/system/systemd-resolved.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Tue 2025-01-14 13:31:15 EST; 1h 53min ago
 Invocation: 23e68552420041cf95f5e4efd90cbf43
       Docs: man:systemd-resolved.service(8)
             man:org.freedesktop.resolve1(5)
             https://systemd.io/WRITING_NETWORK_CONFIGURATION_MANAGERS
             https://systemd.io/WRITING_RESOLVER_CLIENTS
   Main PID: 19671 (systemd-resolve)
     Status: "Processing requests..."
      Tasks: 1 (limit: 9267)
     Memory: 5.5M (peak: 19.7M)
        CPU: 1.596s
     CGroup: /system.slice/systemd-resolved.service
             └─19671 /usr/lib/systemd/systemd-resolved


@rcastle
welcome1

Did you manually modify the reolv.conf file by chance? If not, check that it is properly linked to /run/systemd/resolve/stub-resolv.conf. You can check it with

realpath /etc/resolv.conf

You should check it either way.

1 Like

Check the contents of the file, also. It should be created dynamically and not need to be modified directly.

It does seem to be properly linked to /run/systemd/resolve/stub-resolv.conf

I edited with ‘nano /etc/resolv.conf’ which I would assume edited the linked file. That was just to test what using 8.8.8.8 would do then I put it back the way it was.

Do you have a static IP from your ISP? Did you disable IPv6?

No static IP. I did not disable IPv6. You mean disabling IPv6 in the systemd-resolved settings?

Just, in general. It sounds like your network settings are just default and not manually set.

It sounds like your network settings are just default and not manually set.

Right. Just a fresh install and a wired internet connection to my router.

I cannot reproduce on my network. The commands run successfully.

Try this to force Networkmanager to regenerate resolv.conf

  1. Manualy edit resovle.conf to point to 8.8.8.8
  2. Run this command: nmcli connection up ‘Wired connection 1’

‘Wired connection 1’ will need to be changed to to the name of your connection which you can get by running nmcli connection.

I finally just disabled systemd-resolved and put in my own nameserver IPs. Resolution works fine.

I’ll keep poking at it and if I or anyone else comes up with what’s going on with systemd-resolved we can post it here.

I was never a fan of systemd-resolved for the same reason as the topic of this post, but also I prefer to have my hosts connect directly to an instance of Pihole + Unbound running on my various vlans.

As an alternative, instead of disabling systemd-resolved, you can bypass it by doing this:

  1. Edit /etc/systemd/resolved.conf
  2. Change the line
    #DNSStubListener=yes
    to
    DNSStubListener=no
    (make sure to remove the “#”)
    Save and close the file
  3. systemctl stop systemd-resolved
  4. systemctl status systemd-resolved (make sure the service is now inactive)
  5. rm /etc/resolv.conf
  6. Reboot
  7. resolvectl status (to check your work)

If you’re using DHCP, you should now see those DHCP assigned servers listed in the results of the command above, along with the fallback servers specified in the /etc/systemd/resolved.conf file that you edited in step 1. Also, your /etc/resolv.conf file should now show the “nameserver 127.0.0.53” line has been removed.

1 Like