Repository navigation
Open
Description
Problem appeared today after yesterday distro-upgrade, previous systemd 241 was okay. Since this morning resolving sites sporadically starts failing. Problem disappears upon disabling systemd-resolved.
systemd version the issue has been seen with
242
Used distribution
Archlinux
Expected behaviour you didn't see
Being able to ping google.com
Unexpected behaviour you saw
ping: google.com: Name or service not known
Steps to reproduce the problem
$ sudo systemctl start systemd-resolved
$ ping google.com
ping: google.com: Name or service not knownContent of journalctl -f for executing the commands:
апр 25 09:31:30 constantine-N61Ja sudo[392]: constantine : TTY=pts/1 ; PWD=/tmp ; USER=root ; COMMAND=/usr/bin/systemctl start systemd-resolved
апр 25 09:31:30 constantine-N61Ja sudo[392]: pam_unix(sudo:session): session opened for user root by (uid=0)
апр 25 09:31:30 constantine-N61Ja systemd[1]: Starting Network Name Resolution...
апр 25 09:31:30 constantine-N61Ja systemd-resolved[395]: Positive Trust Anchors:
апр 25 09:31:30 constantine-N61Ja systemd-resolved[395]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb5
апр 25 09:31:30 constantine-N61Ja systemd-resolved[395]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
апр 25 09:31:30 constantine-N61Ja systemd-resolved[395]: Negative trust anchors: 10.in-addr.arpa 16.172.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 168.192.in-addr.arpa d.f.ip6.arpa corp home internal intranet lan local private test
апр 25 09:31:30 constantine-N61Ja systemd-resolved[395]: Using system hostname 'constantine-N61Ja'.
апр 25 09:31:30 constantine-N61Ja systemd[1]: Started Network Name Resolution.
апр 25 09:31:30 constantine-N61Ja audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-resolved comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
апр 25 09:31:30 constantine-N61Ja sudo[392]: pam_unix(sudo:session): session closed for user root
апр 25 09:31:30 constantine-N61Ja kernel: kauditd_printk_skb: 151 callbacks suppressed
апр 25 09:31:30 constantine-N61Ja kernel: audit: type=1130 audit(1556173890.709:292): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-resolved comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
апр 25 09:31:33 constantine-N61Ja systemd[1]: NetworkManager-dispatcher.service: Succeeded.
апр 25 09:31:33 constantine-N61Ja audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
апр 25 09:31:33 constantine-N61Ja kernel: audit: type=1131 audit(1556173893.632:293): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
апр 25 09:31:41 constantine-N61Ja systemd-resolved[395]: DNSSEC validation failed for question google.com IN DS: no-signature
апр 25 09:31:41 constantine-N61Ja systemd-resolved[395]: DNSSEC validation failed for question google.com IN SOA: no-signature
апр 25 09:31:41 constantine-N61Ja systemd-resolved[395]: DNSSEC validation failed for question google.com IN A: no-signature
Output of resolvectl status:
Global
LLMNR setting: yes
MulticastDNS setting: yes
DNSOverTLS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
Current DNS Server: 195.19.33.208
DNS Servers: 195.19.33.208
192.168.88.10
8.8.8.8
8.8.4.4
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 3 (wlp2s0)
Current Scopes: none
DefaultRoute setting: no
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
Link 2 (enp3s0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
DefaultRoute setting: yes
LLMNR setting: yes
MulticastDNS setting: no
DNSOverTLS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
Current DNS Server: 195.19.33.208
DNS Servers: 195.19.33.208
192.168.88.10
8.8.8.8
8.8.4.4
DNS Domain: ~.
FTR: DNSSEC support was already buggy, so there may be a relation.
Reacted by Ory Band, Logan Dam, Thom Wiggers, Adam Emerson, Jiacheng Yang, Sandro, Changsheng Wu, Alexander, Andrey Mazo, Jae 🐾 and 1 more
Activity
makotom commentedon May 28, 2019
Sounds interesting.
May I review debug logs for resolved?
P.S. This may help you configuring resolved to output debug logs.
Hi-Angel commentedon May 28, 2019
Sure. It's 196 lines, so I attached it. It's obtained with the same sequence of steps, i.e.
sudo systemctl start systemd-resolvedand thenping google.com.resolved.log
makotom commentedon May 28, 2019
Thanks for your log!
I was investigating it with fun.
Your log says:
This indicates that
resolvedfailed to verify the authenticity of the empty response forgoogle.com IN DSbecause of lack of information (the reason for the lack is not known at this moment).Frankly speaking, I suspect that the recursive server in use failed to respond NSEC3 records for
google.com IN DS.If I were you, I would:
dig @a.gtld-servers.net google.com DS +dnssecto see what is the expected response forgoogle.com IN DS.Then, try
dig @195.19.33.208 google.com DS +dnssecto see what is the actual response from the recursive server in use. If there're missing RRsets, that's the case.resolvedto always use1.1.1.1or8.8.8.8(or anything else you like - but I recommend either of the two because I've tested them) then see whether the issue is solved. If the issue can be solved, that's the case.Otherwise, I would obtain a packet capture (e.g.
tcpdump -w ~/resolved.pcap -i any udp port 53) to see what is the partresolvedfails to understand.Hope it helps you. :)
FYI: I got the following log for
google.com IN DSon my test environment. (systemd 242.29-1)(Note: The host name parts are masked intentionally.)
Hi-Angel commentedon May 28, 2019
@makotom thank you, great findings!
I don't know details of DNS protocols, so I can't offhand make any conclusions, but for anyone interested, below are outputs for the two
digcommands:dig @a.gtld-servers.net google.com DS +dnssecand
dig @195.19.33.208 google.com DS +dnssecHi-Angel commentedon May 28, 2019
So, I've used
sudo systemctl edit systemd-resolved, added a section:and then started
systemd-resolved. Pinging google still fails.The pcap file is attached below (Note: I changed extension from
pcaptotxt, otherwise github fails to upload it). resolved.pcapmakotom commentedon May 28, 2019
Oh, I tried it with my test environment, and that seems not to be a correct way: By
resolvectl status, I confirmed thatresolvedwas still using the original DNS server (which was configured using DHCP).Could you try it by using
/etc/systemd/resolved.conffollowing this documentation?Hi-Angel commentedon May 28, 2019
Thanks, I tried editing
/etc/systemd/resolved.confto contain the following noncommented lines:Upon starting
systemd-resolvedI still failed to ping google.com.However I figured that there doesn't seem to be a way to override DNS (i.e. 8.8.8.8 is rather used in addition to ones from DHCP), so I changed my network configuration to exclude getting DNSes via DHCP. Thus I left only with
8.8.8.8as a DNS — and this way everything works, I can ping google.com.I wonder if it's a bug too in systemd-resolved: that it doesn't try alternative DNSes when resolution through a prev. one failed.
makotom commentedon May 28, 2019
🎉
Now you can safely say that the issue was caused by the DNS server provided by DHCP.
(Actually, I can see through your packet capture that the server responded "falsified" data for
google.com IN DSwithout NSEC3 RRsets. I think that the server is a little old.)So you mean that, if
resolvedfailed verifying authenticity of a record, you expect it to retry the procedure using fallback servers.That's a good point. Is this an intentional design to avoid retrying DNSSEC verification processes?
Request for comments. Thanks!
Neurognostic commentedon Apr 7, 2020
Seeing this issue today with systemd v245 on Arch Linux.
archlinux.org does not resolve
But other names resolve fine
If the
DNSSEC=option inresolved.confis switchedoff. Then archlinux.org resolves fine.The expected behavior is that
DNSSEC=allow-downgradeshould not fail whereDNSSEC=offwould not, regardless of any fault at the DNS server.makotom commentedon Apr 7, 2020
@Neurognostic Sounds weird, because AFAIK neither
archlinux.org.norduckduckgo.com.supports DNSSEC. Hence, they are under the same condition.That could mean that there is another problem in solving
archlinux.org.Could you collect debug logs from
resolvedand let me investigate it further? (See also: #12388 (comment))BTW, as long as it actually conducts DNSSEC validations,
allow-downgrademay yield results different from that inoff, and it should. (e.g. In case signature validation fails due to response falsification -allow-downgradeshould fail, whereasoffshould not.) Nevertheless,allow-downgradestill accepts "unsigned" RRsetsNeurognostic commentedon Apr 7, 2020
Full systemd-resolved debug log: archlinux.org_systemd-resolved.debug.log
@makotom, looks like something is returning as
signature-expired(not sure what that is specifically), but then it returnsno-signature.Good point, makes sense. If that is the case in this instance and its failing due to response falsification and not "no-signature", then the error message appears misleading to the user. To me, "no-signature" sounds like something
allow-downgradewould handle.btw. I get the same results with any of the archlinux.org subdomains.
makotom commentedon Apr 8, 2020
Thanks for your log @Neurognostic! That was another interesting log.
The log says it failed to validate
NSEC3(a RR to verify that there is no matching RRset requested for) forarchlinux.org IN DSassignature-expired. Even though the log does not tell us more about the reason it determined that it was expired, I realized that theSOAreturns somewhat aggressive Inception datetime, and it could be the root cause. Namely: if your system clock is a couple of hours behind the actual time, the validation of the record would fail due to "expiry", and assume that the response is bogus.(Note: resolved will assume RRs as expired if its inception is 1h10 or more ahead of the current time.)
So my suggestion is to check your system clock that it is well synchronized with NTP servers.
In terms of the error message, I totally understand your point. That is very tricky.
On the other hand, that message is accurate -
archlinux.org IN Aitself hasno-signatureindeed, and, in your particular case,archlinux.org IN DSfailed because there wasno-signature(but an invalid one) which was to prove the response.Right - it is tricky enough. 🤔
RubenKelevra commentedon Apr 19, 2022
I have a similar issue. I'm using as upstream cache my wifi router, which runs
dnsmasq-fullon OpenWRT. The settings of dnsmasq are:So it should check dnssec's signatures itself. It got no issues with this domain. Upstream for the dnsmasq is 1.1.1.1 (and it's ip6) and 8.8.8.8 (and it's ip6).
Doing a request with systemd-resolved on the other hand fails with
The following settings in systemd-resolved do NOT work:
1.1.1.1#cloudflare-dns.com)Changing the server to
1.1.1.1#cloudflare-dns.comworks with normal dns and alsoDNSOverTLS.Here a full log of systemd-resolved on this particular domain (again redacted):
Details
I feel like on a bogus response resolved should at least try the other DNS-Servers as well - which it does not. It just gives up with this weird message.
Also an "allow-downgrade" should allow resolved to downgrade on bogus responses to DNSSec, if configured by the user.
I like to add that everything else works fine, signed and unsigned domains. So it's just this particular domain which gives trouble.
colemickens commentedon Mar 11, 2023
So, do people actually use networkd+resolved(+iwd?) in the wild?
AFAICT, iwd is passing dns servers to networkd which is using them, and then just not trying fallback servers whenever it realizes my upstream is not returning signatures. Meaning that it's just basically broken with countless public/private wifi networks.
acro5piano commentedon Nov 22, 2024
I had this error while connecting NordVPN from my Linux machine. Fixed by disable nordtun dns by:
luckylinux commentedon Feb 28, 2025
I'm getting weird Stuff even with SystemD 255 (255.4-1ubuntu8.5) on Ubuntu 24.04.
For some Reason, ifconfig.me fails DNSSec Validation on Ubuntu Desktop, while I see no such Issues on so many of my Servers (Debian).
On the other Hand, google.com has no Issues at all.
Looking at DNSSec Testing doesn't seem that google.com is much better if at all DNSSec-wise, so kinda tricky to tell why it's failing:
acro5piano commentedon Mar 2, 2025
It turned out the issue happened because my local time was out-of-sync.
sudo timedatectl set-ntp trueandsudo systemctl enable systemd-timesyncdfixed itluckylinux commentedon Mar 2, 2025
It was already enabled in my Case and Time was synchronized. Something else is going on. For now the only Option on the Desktop was to set
DNSSec=offin/etc/systemd/resolved.confand restarting the Service withsystemctl restart systemd-resolved.