Score:1

Need to manually start systemd-resolved for internet to work

br flag

For some reason I suddenly can no longer access internet after (re)booting, I can ping 8.8.8.8 but not google.com, hence there is a problem with name resolution. If I run

sudo systemctl enable systemd-resolved

I regain internet access.

systemctl status systemd-resolved.service

gives

systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/lib/systemd/system/systemd-resolved.service; disabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-07-18 21:07:34 CEST; 40min ago
       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
   Main PID: 12966 (systemd-resolve)
     Status: "Processing requests..."
      Tasks: 1 (limit: 9213)
     Memory: 4.9M
        CPU: 1.073s
     CGroup: /system.slice/systemd-resolved.service
             └─12966 /lib/systemd/systemd-resolved

jul 18 21:07:34 chewbacca systemd-resolved[12966]: Positive Trust Anchors:
jul 18 21:07:34 chewbacca systemd-resolved[12966]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
jul 18 21:07:34 chewbacca systemd-resolved[12966]: Negative trust anchors: home.arpa 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.a>
jul 18 21:07:34 chewbacca systemd-resolved[12966]: Using system hostname 'chewbacca'.
jul 18 21:07:34 chewbacca systemd-resolved[12966]: wlp2s0: Bus client set default route setting: yes
jul 18 21:07:34 chewbacca systemd[1]: Started Network Name Resolution.
jul 18 21:07:34 chewbacca systemd-resolved[12966]: wlp2s0: Bus client set DNS server list to: 46.227.67.134, 192.165.9.158
jul 18 21:07:48 chewbacca systemd-resolved[12966]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 46.227.67.134.
jul 18 21:13:02 chewbacca systemd-resolved[12966]: Using degraded feature set UDP instead of UDP+EDNS0 for DNS server 46.227.67.134.
jul 18 21:15:39 chewbacca systemd-resolved[12966]: Grace period over, resuming full feature set (UDP+EDNS0) for DNS server 46.227.67.134.

I defined the DNS servers in /etc/systemd/resolved.conf:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it under the
#  terms of the GNU Lesser General Public License as published by the Free
#  Software Foundation; either version 2.1 of the License, or (at your option)
#  any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file, or by creating "drop-ins" in
# the resolved.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full con
fig.
#
# See resolved.conf(5) for details.

[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:47
00::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
# Google:     8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.goo
gle 2001:4860:4860::8844#dns.google
# Quad9:      9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dn
s.quad9.net 2620:fe::9#dns.quad9.net
DNS=46.227.67.134
FallbackDNS=192.165.9.158
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=no
#LLMNR=no
#Cache=no-negative
#CacheFromLocalhost=no
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=noresolved.conf:

Am a bit a loss here as everything was working fine yesterday, have googled several hours but not found a solution as to why I suddenly need to manually start systemd-resolved to get internet access. This is on Ubuntu 22.04 LTS. Note that I have defined the same 2 DNS servers in my router, and also added them to the IPv4 settings tab of the Network Connections (via the GUI). Any pointers appreciated!

Thanks/Evert

hr flag
It's strange that `systemctl enable` wouldn't be persistent across reboots - it should just create a symbolic link in `/etc/systemd/system/multi-user.target.wants/` and then reload the service
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.