Skip to content

Systemd-resolved does not work properly on Arch Linux. #11102

Closed

Description

@yuzumx

systemd version the issue has been seen with

systemd 239
+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid

Used distribution

Arch Linux

Expected behaviour you didn't see

DNS resolution is normal.

Unexpected behaviour you saw

The first DNS resolution request after startup failed.

Steps to reproduce the problem

1 . Enable systemd-networkd.service and systems-resolved.service
2. Start the operating system.
3. Just initiate a DNS request (such as ping a URL).
4. The error occurred (like ping: www.baidu.com: Name or service not known).
5. The DNS resolution will be normal in the future.


My systemd-networkdconfig (/etc/systemd/network/80-dhcp.network ):

[Match]
Name=enp0s3

[Network]
DHCP=yes

[DHCP]
UseHostname=false

My resolv.conf:

  lrwxrwxrwx  1 root root     32 Dec 10 11:10 resolv.conf -> /run/systemd/resolve/resolv.conf

(BTW, After linking it to /run/systemd/resolve/stub-resolv.conf, this issue still exists.)

The output of resolvctl status:
Before the first resolve request:

Global
       LLMNR setting: yes
MulticastDNS setting: yes
  DNSOverTLS setting: no
      DNSSEC setting: allow-downgrade
    DNSSEC supported: no
Fallback DNS Servers: 1.1.1.1
                      9.9.9.10
                      8.8.8.8
                      2606:4700:4700::1111
                      2620:fe::10
                      2001:4860:4860::8888
          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 2 (enp0s3)
      Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: allow-downgrade
    DNSSEC supported: yes
  Current DNS Server: 172.20.10.1
         DNS Servers: 172.20.10.1

After the first resolve request:

Global
       LLMNR setting: yes
MulticastDNS setting: yes
  DNSOverTLS setting: no
      DNSSEC setting: allow-downgrade
    DNSSEC supported: no
Fallback DNS Servers: 1.1.1.1
                      9.9.9.10
                      8.8.8.8
                      2606:4700:4700::1111
                      2620:fe::10
                      2001:4860:4860::8888
          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 2 (enp0s3)
      Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: allow-downgrade
    DNSSEC supported: no
  Current DNS Server: 172.20.10.1
         DNS Servers: 172.20.10.1

I am not sure if this is a bug or my configuration problem. But I lack the knowledge of judgment. So come here to ask questions. Please forgive my stupidity.

Please let me know if there are other information that I need to provide.
Also please forgive me for my bad English.

Thank you.

Activity

  1. poettering commented on Dec 11, 2018

    @poettering
    Member

    Please turn on debug logging for systemd-resolved. For that try systemctl edit systemd-resolved then place this in the editor that opens then:

    [Service]
    Environment=SYSTEMD_LOG_LEVEL=debug
    

    Then issue systemctl restart systemd-resolve. Then reproduce the issue (which iiuc means you need to reboot). When you reproduced the issue, please paste the output of "journalctl -u systemd-resolved" somwhere and link it here. This should tell us why the initial lookups fail.

    (That said: maybe the network interface is not actually up that early?)

  2. added
    needs-reporter-feedback ❓
    on Dec 11, 2018
  3. yuzumx commented on Dec 11, 2018

    @yuzumx
    Author

    I will try it. This may take some time because the problematic computer is not around and there is no remote connection enabled.

    But I have a simple supplement here:

    When I changed DNSSEC= from allow-downgrade to no, the problem was solved.

  4. yuzumx commented on Dec 13, 2018

    @yuzumx
    Author
  5. jaklug commented on Jul 13, 2019

    @jaklug

    I just installed arch linux on an arm processor, and after a day, I started having this issue. I was also able to correct it by creating the file /etc/systemd/resolved.conf, and setting:

    [Resolve]
    DNSSEC=no

    Before, according to resolvectl status, it was set to allow-downgrade.

    My DNS is from my ISP (Comcast in the US), and their DNS (75.75.75.75 and 75.75.76.76) were in /run/systemctl/resolve/resolve.conf.

    This problem started after I upgraded from the initial archlinuxarm image.

    Thank you yuzumx for finding this issue.

  6. DigitalFlow commented on Nov 3, 2019

    @DigitalFlow

    Just stumbled upon this issue as well with my NUC which runs Arch Linux.
    Setting DNSSEC to no really seems to solve this issue.

    To me it seems the issues first appeared once I had a PiHole included in my network.
    Any chance @yuzumx and @jaklug you both also have one in your network?

  7. jaklug commented on Nov 4, 2019

    @jaklug

    No pi's on my network. Just PC's running Windows and Linux, and Android phones.

  8. DigitalFlow commented on Nov 4, 2019

    @DigitalFlow

    @poettering:
    Do you need more logs, or did the one from @yuzumx suffice?

  9. removed
    needs-reporter-feedback ❓
    on Apr 17, 2020
  10. keszybz commented on Oct 21, 2020

    @keszybz
    Member
    DNSSEC validation failed for question baidu.com IN DS: failed-auxiliary
    Transaction 56022 for <baidu.com IN DS> on scope dns on enp0s3/* now complete with <dnssec-failed> from network (unsigned).
    Auxiliary DNSSEC RR query failed validation: failed-auxiliary
    
  11. added 2 commits that reference this issue on Feb 16, 2021
    ae41955
    e30a62b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions