-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
icmp: Both A and AAAA records are queried regardless of preferred_ip_protocol/ip_protocol_fallback #724
Comments
You can do negative caching, as long as it doesn't go over the TTL in the SOA, but there's no requirement to do so last I checked.
It seems like a bit of an odd situation, but we could do that and it might even make the code a tad simpler. |
I'm noticing the same behavior. Also setting ip_fallback_protocol to false doesn't seem to stop ipv6 queries. My config:
|
To be clear, are you saying the above is sending ipv6 ICMP queries? |
DNS queries. I'm pinging a FQDN and in the name resolution process it queries both A (which resolves just fine) and AAAA (which resolves to NO DATA as I don't have a ipv6 resolver) records even though the prefered_ip_protocol and ip_protocol_fallback are setup as shown above. I also see this behavior with the http_2xx module if it helps narrow down the issue. |
This is what this issue is about, but it's not a bug per-se. It's only promised that the icmp/http request is over the given protocol. |
Apologies if replying here on a closed issue is not appropriate, but did this ever make it into the builds? I'm seeing both A and AAAA DNS query for ICMP probe targets.
tcpdump:
Configured in .yml as follows:
/config does not show the fallback = false under the dns: heading. Expected?
Impact: In this environment, A records are answered locally by a forwarding resolver (network router), while AAAA are forwarded further. During an upstream outage there is no network route to the upstream resolver and the AAAA record is thus answered as "refused", while the A record is answered just fine. Blackbox then falsely fails the probe at the DNS step even though a valid A record was received and the target is perfectly reachable by ICMP in the un-severed part of the network. Is my config/expectation wrong, or did I stumble on an unaddressed scenario? [edit] Additional information. Here is the failed probe log from blackbox (looks like a timeout):
And here is the protocol decode snipped from Wireshark for the DNS response during the failure condition:
Thanks in advance for any guidance. |
My local DNS cache server doesn't cache results for record that doesn't exist. E.g. if a domain don't have a configured AAAA record, a DNS query to the AAAA record will not be cached. I have no idea if this is the expected behavior (The server is https://github.com/AdguardTeam/AdGuardHome FWIW).
This leads to a higher icmp probe latency for domain names that doesn't have an AAAA record.
Reading the code, it looks like the prober is always sending A/AAAA DNS queries regardless of the preferred_ip_protocol and ip_protocol_fallback by using
resolver.LookupIPAddr(...)
.blackbox_exporter/prober/utils.go
Line 67 in 998037b
Would it make more sense to call
resolver.LookupIP
with thepreferred_ip_protocol
, and then make follow up DNS queries only ifip_protocol_fallback
is true?Host operating system: output of
uname -a
Linux nuc 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
blackbox_exporter version: output of
blackbox_exporter --version
blackbox_exporter, version 0.18.0 (branch: HEAD, revision: 60c86e6)
build user: root@53d72328d93f
build date: 20201012-09:46:31
go version: go1.15.2
What is the blackbox.yml module config.
What is the prometheus.yml scrape config.
What logging output did you get from adding
&debug=true
to the probe URL?What did you do that produced an error?
N/A (no error)
What did you expect to see?
DNS resolve latency should be very low (using a local cached DNS server)
What did you see instead?
DNS resolve latency is higher than expected:
probe_icmp_duration_seconds{phase="resolve"} 0.043219132
The text was updated successfully, but these errors were encountered: