AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
25.5k stars 1.83k forks source link

Server returned 500 error when SafeSearch enabled #5913

Closed ammnt closed 1 year ago

ammnt commented 1 year ago

Prerequisites

Platform (OS and CPU architecture)

Linux/AMD64 (aka x86_64)

Installation

Docker

Setup

On one machine

AdGuard Home version

0.107.32

Action

2023-06-17T21:01:50.106542764Z ;; QUESTION SECTION: 2023-06-17T21:01:50.106545359Z ;yandex.ru. IN AAAA 2023-06-17T21:01:50.106547904Z
2023-06-17T21:01:50.106550689Z 2023/06/18 00:01:50.106088 6#104 [debug] applying filters: looking for client with ip 46.242.15.214 and clientid "9569d98d" 2023-06-17T21:01:50.106553525Z 2023/06/18 00:01:50.106133 6#104 [debug] applying filters: using settings for client "MacBook" (46.242.15.214; "9569d98d") 2023-06-17T21:01:50.106556250Z 2023/06/18 00:01:50.106255 6#104 [debug] safesearch default: lookup for "yandex.ru" finished in 9.668µs 2023-06-17T21:01:50.106575686Z 2023/06/18 00:01:50.106366 6#104 [debug] github.com/AdguardTeam/dnsproxy/proxy.(Proxy).ServeHTTP(): error handling DNS (https) request: talking to dns upstream: checking host "yandex.ru": safe search: no ipv4 addresses for "yandex.ru" 2023-06-17T21:01:50.447766770Z 2023/06/18 00:01:50.446818 6#106 [debug] github.com/AdguardTeam/dnsproxy/proxy.(Proxy).ServeHTTP(): Incoming HTTPS request on /dns-query/9569d98d 2023-06-17T21:01:50.447810512Z 2023/06/18 00:01:50.446910 6#106 [debug] github.com/AdguardTeam/dnsproxy/proxy.remoteAddr(): Using IP address from HTTP request: 2001:ac8:16:3::2 2023-06-17T21:01:50.447829287Z 2023/06/18 00:01:50.446971 6#106 [debug] request came from proxy server 172.16.0.3:48712 2023-06-17T21:01:50.447833686Z 2023/06/18 00:01:50.447054 6#106 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): IN: ;; opcode: QUERY, status: NOERROR, id: 0 2023-06-17T21:01:50.447836992Z ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

Expected result

No HTTP and resolving errors when safesearch enabled :)

Actual result

Resolving and HTTP errors

Additional information and/or screenshots

image image

ainar-g commented 1 year ago

Thanks for the report and the logs. It seems that despite the misleading no ipv4 addresses message, the bug here actually concerns AAAA queries.

We'll try to fix this soon, and in the meantime this DNS rewrite rule should be able to alleviate the situation:

||yandex.ru^$dnstype=AAAA,dnsrewrite=NOERROR
ainar-g commented 1 year ago

@ammnt, please try out version v0.108.0-a.569+d26c480d0 on the Edge channel. It should fix the AAAA query issue.

ammnt commented 1 year ago

@ammnt, please try out version v0.108.0-a.569+d26c480d0 on the Edge channel. It should fix the AAAA query issue.

Yeah. No error anymore. Thanks👍🏼

ammnt commented 1 year ago

@ainar-g, but I have the same error for DuckDuckGo and Bing. Please check all SafeSearch hosts and add general fix for them too🤔

ainar-g commented 1 year ago

@ammnt, you're correct. The more recent versions on the Edge channel should fix that as well.

ammnt commented 1 year ago

@ammnt, you're correct. The more recent versions on the Edge channel should fix that as well.

It works better now. Thanks again!👍🏼