-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Some AAAA lookups are not cached #3707
Comments
Possibly related to #3598. Can you please provide an example of DNS query that shows this behaviour? E.g. an Thanks. |
Hi, So, example NSLookup for AAAA record:
Hits AdGuard Home, and then do the same query another couple of times. In the AdGuard home log, I can see each query forwarded to an external DNS provider, and not retrived from the cache. You can see in the response details that a TTL time of 1 hour is set, however the very next query goes out again to external DNS and does not use the cache |
Thanks, we can reproduce this. We'll try to investigate what's causing this and what the correct behaviour is. |
Merge in DNS/dnsproxy from 3707-cache-negative to master Updates AdguardTeam/AdGuardHome#3707. Squashed commit of the following: commit f5e8a32 Author: Eugene Burkov <[email protected]> Date: Mon Oct 25 20:50:46 2021 +0300 proxy: imp docs commit f3fc155 Author: Eugene Burkov <[email protected]> Date: Mon Oct 25 20:12:32 2021 +0300 proxy: imp caching of negative answers
Merge in DNS/adguard-home from 3707-aaaa-cache to master Updates #3707. Squashed commit of the following: commit ad9f43e Author: Eugene Burkov <[email protected]> Date: Tue Oct 26 12:57:44 2021 +0300 all: fix issue number commit 4a81579 Author: Eugene Burkov <[email protected]> Date: Tue Oct 26 12:44:16 2021 +0300 all: upd proxy
@tescophil, hello again. We've found and fixed a few gaps between the cache implementation and what RFC 2308 says. The latest build in the edge channel contains our solution so could you please install and check if it caches negative answers properly? |
@EugeneOne1 More than happy to give this a go...., I'm just running the standard build on Debian (no VM's etc), any tips on how to switch to this build ? |
@tescophil, it depends on how did you install the AGH. To download and install the binary manually you may use one of these links from "Edge channel builds" sublist. Also, you might want to consider creating a backup of |
@EugeneOne1 I originally installed using the automated script on the git hub page:
I've taken a backup of the whole AdGuardHome directory, so is it safe just to then run:
... will this retain all my settings, or just replace it with a clean install ? |
@tescophil, at the first glance, it should detect the existing install and fail. To reinstall the existing AGH you may use something like this: curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -r -c edge This also purges all the settings, statistics and query logs since the whole AGH's directory is removed during the reinstall. |
@EugeneOne1 OK, well that's not ideal.., I have a lot of settings and options saved (not worried about logs/stats), no way to upgrade and retain the existing settings ? (or a simple way to put them back after the re-install..) |
@tescophil, if you've made a backup of the entire AGH directory, it should be safe to reinstall it. All the configuration data is also stored inside the AGH's directory. |
@EugeneOne1, OK not kinda what I asked, but never mind..., so imagine I'm 7 and need a list of stuff to do that does not nuke my existing install..., something like:
Not sure if this is all that needs to be done, as there is no (or I can't find) any documentation on how to do this. |
@tescophil, looks correct. |
@EugeneOne1, Cool.., so got the new version installed and the previous AAAA queries that were not being cached now are, Hurray. The only feedback I have is for when 'NOERROR' is the response code to the AAAA query, but there is no actual response, i.e. an IP address. In this case, instead of simply not displaying the response: It would be useful if it could be more like this: Where the IP would be replaced by something like 'AAAA:NULL', and the TTL time displayed. (as with the current implementation there is no way to see what the TTL time of the empty response is) Like the Optimistic Caching option... ;-) |
@tescophil, it seems, the query log actually doesn't consider the TTL values from these responses. We've filed an issue (#3773) about it so you may track the one for the actual state. However, the original issue seems to be resolved so I'll close it for now. Thanks for testing. |
It seems that this issue has returned in 0.107.3. I'm rolling back to 0.107.2 for the moment. |
@ClosedPort22, could you please provide some examples of requests that aren't cached properly? |
@EugeneOne1 Sure. This issue affects all NOERROR responses. Here are some examples:
Command output (only the second query is shown):
The caching mechanism works perfectly in 0.107.2. AGH uses the TTL value of the SOA record to cache the response. I'm not sure why #3598 wasn't marked as resolved. |
@ClosedPort22, sorry for the late response.
So, aren't these requests marked as "(served from cache)" in the response details section of Query Log? I'm not able to reproduce it on v0.107.3. Could you please collect a verbose log for us? You may either post it here or send it to [email protected]. Thanks. |
@EugeneOne1 Thanks for the response. I reinstalled AGH after noticing strange errors in the log (version number not showing, etc.) and now everything's working normally. I suspect all this had been caused by a corrupted binary. Sorry for the inconvenience. |
Merge in DNS/adguard-home from 3707-aaaa-cache to master Updates AdguardTeam#3707. Squashed commit of the following: commit ad9f43e Author: Eugene Burkov <[email protected]> Date: Tue Oct 26 12:57:44 2021 +0300 all: fix issue number commit 4a81579 Author: Eugene Burkov <[email protected]> Date: Tue Oct 26 12:44:16 2021 +0300 all: upd proxy
|
Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Issue Details
v0.106.3
GitHub release
AdGuard IP assigned by router in DHCP lease
N/A
AMD64
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Expected Behavior
I expect all AAAA DNS lookups to be cached
Actual Behavior
Many AAAA Lookups are not cached. If a AAAA lookup simply returns NOERROR with an empty response or a CNAME entry then it is not cached.
Screenshots
Screenshot:
![Screenshot from 2021-10-06 10-15-03](https://user-images.githubusercontent.com/59442445/136175863-71ab2039-673b-499f-8519-791505859fa8.png)Additional Information
Don't know if this is a bug or a feature, but I see no reason why these types of request/response should not be cached, unless someone can explain why ?
The text was updated successfully, but these errors were encountered: