Skip to content
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

Server returned 500 error when SafeSearch enabled #5913

Closed
4 tasks done
ammnt opened this issue Jun 17, 2023 · 6 comments
Closed
4 tasks done

Server returned 500 error when SafeSearch enabled #5913

ammnt opened this issue Jun 17, 2023 · 6 comments
Assignees
Milestone

Comments

@ammnt
Copy link

ammnt commented Jun 17, 2023

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
Copy link
Contributor

ainar-g commented Jun 19, 2023

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 ainar-g self-assigned this Jun 19, 2023
@ainar-g ainar-g added this to the v0.107.33 milestone Jun 19, 2023
adguard pushed a commit that referenced this issue Jun 19, 2023
Updates #5913.

Squashed commit of the following:

commit a0ab132
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Jun 19 15:23:44 2023 +0300

    all: fmt; typo

commit 3a2e561
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Jun 19 15:16:28 2023 +0300

    all: fix safesearch for ipv6
@ainar-g
Copy link
Contributor

ainar-g commented Jun 19, 2023

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

@ammnt
Copy link
Author

ammnt commented Jun 19, 2023

@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
Copy link
Author

ammnt commented Jun 19, 2023

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

adguard pushed a commit that referenced this issue Jun 20, 2023
Updates #5913.

Squashed commit of the following:

commit 6bff5ee
Merge: 0a6f490 2902f03
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 20 14:14:47 2023 +0300

    Merge branch 'master' into 5913-fix-safesearch-ipv6-better

commit 0a6f490
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 20 14:11:18 2023 +0300

    safesearch: imp tests

commit 3f9056d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Jun 19 23:01:03 2023 +0300

    safesearch: fix ipv6 more
@ainar-g
Copy link
Contributor

ainar-g commented Jun 20, 2023

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

@ammnt
Copy link
Author

ammnt commented Jun 20, 2023

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

It works better now. Thanks again!👍🏼

@ainar-g ainar-g closed this as completed Jun 20, 2023
@ainar-g ainar-g modified the milestones: v0.107.34, v0.107.33 Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants