I always have to restart systemd-resolved.service to access internet

I have been having this issue for a while but now is the time to fix it because some updates won’t install without access to the internet on boot.

After boot into desktop, I have to run:

➜  ~ sudo systemctl restart systemd-resolved.service

This allows my internet connection to work.

How do I go about diagnosing the problem and is there any debug information that you guys need to help me?

Thanks

After startup of the system, what does systemctl status systemd-resolved.service say?
Do you find anything suspicious in the logs? Warning or error message from systemd-resolved? Is the service enabled?

2 Likes

I have found these messages in the logs:

09:42:40 systemd-resolve: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 192.168.40.1.
09:28:31 systemd: Started systemd-resolved.service - Network Name Resolution.
09:28:31 systemd-resolve: Defaulting to hostname 'fedora'.
09:28:30 systemd: Starting systemd-resolved.service - Network Name Resolution...
09:28:30 sudo: alex : TTY=pts/0 ; PWD=/home/alex ; USER=root ; COMMAND=/usr/bin/systemctl start systemd-resolved.service
09:28:26 systemd: Stopped systemd-resolved.service - Network Name Resolution.
09:28:26 sudo: alex : TTY=pts/0 ; PWD=/home/alex ; USER=root ; COMMAND=/usr/bin/systemctl stop systemd-resolved.service
09:28:16 systemd: Started systemd-resolved.service - Network Name Resolution.
09:28:16 systemd-resolve: Defaulting to hostname 'fedora'.
09:28:16 systemd: Starting systemd-resolved.service - Network Name Resolution...
09:28:16 sudo: alex : TTY=pts/0 ; PWD=/home/alex ; USER=root ; COMMAND=/usr/bin/systemctl restart systemd-resolved.service
09:27:57 systemd-resolve: wlp2s0: Bus client reset DNS server list.
09:27:34 systemd: Started systemd-resolved.service - Network Name Resolution.
09:27:34 systemd-resolve: Defaulting to hostname 'fedora'.
09:27:34 systemd: Starting systemd-resolved.service - Network Name Resolution...
09:27:34 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:34 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:34 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:34 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:34 sudo: alex : TTY=pts/0 ; PWD=/home/alex ; USER=root ; COMMAND=/usr/bin/systemctl restart systemd-resolved.service
09:27:30 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:30 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:30 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:30 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:30 systemd-resolve: Failed to send hostname reply: Transport endpoint is not connected
09:27:24 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:27:21 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:27:12 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:27:09 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:27:00 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:26:56 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:26:47 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:26:44 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:26:35 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:26:32 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:26:23 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:26:20 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:26:10 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:26:07 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:25:58 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:25:55 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:25:46 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:25:43 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:25:34 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:25:30 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:25:21 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:25:18 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:25:09 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:25:06 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:24:57 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:24:54 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:24:44 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:24:41 systemd-resolve: Using degraded feature set UDP instead of TCP for DNS server 192.168.40.1.
09:24:34 systemd-resolve: Using degraded feature set TCP instead of UDP for DNS server 192.168.40.1.
09:24:28 systemd-resolve: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 192.168.40.1.
09:24:10 systemd-resolve: wlp2s0: Bus client set DNS server list to: 192.168.40.1
09:24:10 systemd-resolve: wlp2s0: Bus client set default route setting: yes
09:24:10 systemd: Started systemd-resolved.service - Network Name Resolution.
09:24:10 systemd-resolve: Defaulting to hostname 'fedora'.
09:24:10 systemd: Starting systemd-resolved.service - Network Name Resolution...
09:24:10 sudo: alex : TTY=pts/0 ; PWD=/home/alex ; USER=root ; COMMAND=/usr/bin/systemctl restart systemd-resolved.service

As you can see - initially there is something wrong, until I manually restart the systemd-resolved.service

Any advice?

1 Like

Private DNS often do not meet modern specifications.
This can lead to various issues such as timeouts and denial of service.
Consider replacing your private DNS with a public DNS provider.

1 Like

Hi,

recently I had a similar issue: No DNS after updating network manager
My solution was to set a rule for SELinux:
sudo ausearch -c ‘systemd-resolve’ --raw | audit2allow -M my-systemdresolve
sudo semodule -i my-systemdresolve.pp

2 Likes