Ubuntu - Need to manually restart resolved

After upgrading to Ubuntu 19.04 I need to manually restart systemd-resolved.service for DNS to work. When I check the status the service is running, but DNS requests are only possible after I restart it. Any ideas what’s wrong?

check journalctl?

journalctl -u systemd-resolved.service

2 Likes
-- Reboot --
Jun 18 20:30:00 ubuntu systemd[1]: Starting Network Name Resolution...
Jun 18 20:30:03 ubuntu systemd-resolved[654]: Positive Trust Anchors:
Jun 18 20:30:03 ubuntu systemd-resolved[654]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
Jun 18 20:30:03 ubuntu systemd-resolved[654]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Jun 18 20:30:03 ubuntu systemd-resolved[654]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-a
Jun 18 20:30:03 ubuntu systemd-resolved[654]: Using system hostname 'ubuntu'.
Jun 18 20:30:03 ubuntu systemd[1]: Started Network Name Resolution.
Jun 18 20:30:34 ubuntu systemd-resolved[654]: Using degraded feature set (UDP) for DNS server 10.0.0.1.
Jun 18 21:47:52 ubuntu systemd[1]: Stopping Network Name Resolution...
Jun 18 21:47:52 ubuntu systemd[1]: systemd-resolved.service: Succeeded.
Jun 18 21:47:52 ubuntu systemd[1]: Stopped Network Name Resolution.
Jun 18 21:47:52 ubuntu systemd[1]: Starting Network Name Resolution...
Jun 18 21:47:53 ubuntu systemd-resolved[3593]: Positive Trust Anchors:
Jun 18 21:47:53 ubuntu systemd-resolved[3593]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
Jun 18 21:47:53 ubuntu systemd-resolved[3593]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Jun 18 21:47:53 ubuntu systemd-resolved[3593]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-
Jun 18 21:47:53 ubuntu systemd-resolved[3593]: Using system hostname 'ubuntu'.
Jun 18 21:47:53 ubuntu systemd[1]: Started Network Name Resolution.
Jun 18 21:47:53 ubuntu systemd-resolved[3593]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying
Jun 18 21:47:57 ubuntu systemd-resolved[3593]: Using degraded feature set (UDP) for DNS server 10.0.0.1.

This dump includes my restart of resolved. I restarted it at 21:47, is it possible that the notebook doesn’t particularly like the degraded feature set?

what does your etc/resolv.conf look like?

tbh, I dont know. DNS is always over my head most of the time.

1 Like
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53

And systemd-resolve --status:

Global
       LLMNR setting: no
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
  Current DNS Server: 192.168.2.70
         DNS Servers: 192.168.2.70
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 3 (wlp3s0)
      Current Scopes: DNS
DefaultRoute setting: yes
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
  Current DNS Server: 10.0.0.1
         DNS Servers: 10.0.0.1
          DNS Domain: ~.

Link 2 (enp1s0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Hmm… DNS server 192.168.2.70 is deprecated…that might be the problem.

Yeah but its still bitching about an error when its clearly selecting 10.0.0.1

might have to wait for someone with an IQ above 75 on this one man. Sorry.

@SesameStreetThug u got any info on DNS in that little birb brain?

1 Like

Thanks for the help for now :wink:

1 Like

DNS is bloat, I type in the IP address manually every time; but here is some insight I can offer…

Ubuntu used to do something similar to me back in 18.04 where systemd-resolved would not work. You may not like my answer but I will continue for the sake of explaining a few things. First off, systemd-resolved is redundant and idiotic; It runs it’s own internal DNS server to recurse against the real DNS server you are running lookups against and is tacked on for reasons that I don’t understand. The traditional way of setting your DNS server is to have it specified in /etc/resolv.conf, which is often managed by other networking tools such as NetworkManager or netconfig. My suggestion: don’t use systemd-networkd, you’re better off sticking to resolv.conf or something that manages via resolv.conf.

Things to try troubleshooting:

  • systemctl stop systemd-resolved
  • edit /etc/resolv.conf and add a public DNS server such as 8.8.8.8 or 1.1.1.1
search local
nameserver 1.1.1.1
  • check that the changes have taken effect-
~> nslookup 
> server 
Default server: 1.1.1.1 
Address: 1.1.1.1#53 
  • If not systemctl restart network
2 Likes

If this works, I’d also have to execute systemctl disable systemd-resolved in order to deactivate it permanently, haven’t I?

Edit:
So I tried your changes, but resolv.conf gets overwritten on ever restart of the system…

yes

read resolv.conf, It will often say in a comment what the tool that wrote the file is.

Failed to restart network.service: Unit network.service not found.