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

DNS Server crashes on settings change using TLS upstream #5122

Closed
3 tasks done
Commy opened this issue Nov 9, 2022 · 14 comments
Closed
3 tasks done

DNS Server crashes on settings change using TLS upstream #5122

Commy opened this issue Nov 9, 2022 · 14 comments
Labels
duplicate Duplicate or merged issues.

Comments

@Commy
Copy link

Commy commented Nov 9, 2022

Prerequisites

  • I have checked the Wiki and Discussions and found no answer

  • I have searched other issues and found no duplicates

  • I want to report a bug and not ask a question

Operating system type

Linux, Other (please mention the version in the description)

CPU architecture

64-bit ARM

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

107.18

Description

What did you do?

Changed a setting, e.g. enabled DNSSEC or changed the blocking mode. (Doesn’t really matter what setting as long as it restarts the DNS server when applying).

The primary Upstream DNS is configured to use TLS using tls://1.1.1.1:853 or Adguard’s TLS equivalent.

Expected result

Settings should be applied and server should continue to run.

Actual result

DNS Server crashes and stops resolving until a manual restart of the AdGuard Home service.

Screenshots (if applicable)

BE9B5AFA-A2BC-46F3-9EB1-AF496C4615B0

31799D08-2494-44F3-9614-D9E1A96A30FC

Additional information

Hardware: Raspberry Pi 3b
OS: Raspbian lite 64 bit (Debian 11 Bullseye)

At first I thought this was due to a conflict with unbound when I installed it. I removed it, same error. I then reinstalled the entire OS and only installed AdGuard Home. Same error. I haven’t seen this error before, but I have started using a TLS upstream only recently. Doesn’t occur when using Plain DNS Upstream.

@monkitrainer
Copy link

Noticed the same issue in 107.17+ when trying to save changes in DNS settings.
I've been using 107.16 and never noticed such error until I updated to 107.18. Same issue was happening in 107.17.

/control/dns_config: could not reconfigure the server: closing primary resolvers: stopping dns proxy server: failed to close some upstreams: 3 errors: "failed to close some connections: 5 errors: \"tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:39710->1.0.0.1:853: write: broken pipe\", \"tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:39718->1.0.0.1:853: write: broken pipe\", \"tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:39808->1.0.0.1:853: write: broken pipe\", \"tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:39988->1.0.0.1:853: write: broken pipe\", \"tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:39994->1.0.0.1:853: write: broken pipe\"", "failed to close some connections: 2 errors: \"tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:58688->8.8.4.4:853: write: broken pipe\", \"tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:58620->8.8.4.4:853: write: broken pipe\"", "failed to close some connections: tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 172.19.6.25:40034->9.9.9.9:853: write: broken pipe"

@CDzungx
Copy link

CDzungx commented Nov 9, 2022

Same error on v0.108.0-a.381+98af0e00. Occur kinda randomly.

@pendie
Copy link

pendie commented Nov 9, 2022

I also experienced it im back 0.107.16

@Maffsie
Copy link

Maffsie commented Nov 11, 2022

I'm experiencing this pretty regularly when saving settings in AdGuard Home 107.18, also only with DoT upstreams (dns.switch.ch and dns10.quad9.net)

@pauly2805
Copy link

Happens for me 100% of the time if there is any DoT upstream present. It crashes the entire DNS any time I try to apply any DNS config changes in the web interface. Without any DoT upstreams, problem is gone.
Not sure exactly when this first started occuring but last time I was fiddling with config it didn't have this issue (would be a few versions back)

Adguard version: v0.107.18
Environment: Docker on Unraid v6.11.2
Hardware: Intel 12600k, 64gb ram
Network:

  • Docker config: macvlan with dedicated NIC/dedicated IP for adguard home (192.168.5.10) (realtek 2.5g onboard)

2022/11/13 12:13:23.934825 [info] Start reconfiguring the server 2022/11/13 12:13:23.934843 [info] Stopping the DNS proxy server 2022/11/13 12:13:23.935361 [info] Stopped the DNS proxy server 2022/11/13 12:13:23.935479 [error] POST [*my local adguard domain*] /control/dns_config: could not reconfigure the server: closing primary resolvers: stopping dns proxy server: failed to close some upstreams: failed to close some connections: 7 errors: "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.5.10:53692->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.5.10:53760->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.5.10:53714->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.5.10:53730->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.5.10:53764->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.5.10:43144->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.5.10:48814->1.0.0.1:853: write: broken pipe"

Works fine again upon restarting the container

@physx2494
Copy link

I can confirm everything that pauly2805 wrote. I'm, using AGH on macvlan too.

@Commy
Copy link
Author

Commy commented Nov 27, 2022

My problem went away after an update to version 107.19. Did somebody silently fix the issue? I don't see any more errors or server crashes when applying settings.

@Glassertje
Copy link

Glassertje commented Nov 28, 2022

Same thing happens here 107.19 Raspberry Pi 4 wnrt back to DoH

Error: control/dns_config | could not reconfigure the server: closing primary resolvers: stopping dns proxy server: failed to close some upstreams: failed to close some connections: 4 errors: "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.50.200:37398->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.50.200:44694->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.50.200:44704->1.0.0.1:853: write: broken pipe", "tls: failed to send closeNotify alert (but connection was closed anyway): write tcp 192.168.50.200:35214->1.0.0.1:853: write: broken pipe" | 500

@buzzwebly
Copy link

buzzwebly commented Nov 30, 2022

I'm running 107.19 (on Linux) and it's still an issue, 107.19 didn't fix it.

@kuduacz
Copy link

kuduacz commented Dec 5, 2022

same here on dell wyse dx0d with HA (ADH as addon).
And my adh resolve time jump from 5 ms to 80 ms...

@pbanana
Copy link

pbanana commented Dec 6, 2022

I'm also having the same issue. I have two AGH setups one on a Pi0 W and Pi4B. I've got NextDNS as my upstream for both DoH and DoT.

@iamydp
Copy link

iamydp commented Dec 7, 2022

Same question here on v0.107.19 x86_64. But v0.108.0-b.10 arm_64 doesn't have such problem, configurations are totally same.

@ICEY1W32
Copy link

Same question here on v0.107.20 x86_64 Docker.

@ainar-g
Copy link
Contributor

ainar-g commented Dec 13, 2022

Apologies for the long response, everyone. We're preparing a fix in #5251, and we're planning to publish a new release with this issue fixed very soon. I'll merge this issue into that one.

@ainar-g ainar-g closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2022
@ainar-g ainar-g added the duplicate Duplicate or merged issues. label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Duplicate or merged issues.
Projects
None yet
Development

No branches or pull requests