hassio-addons / addon-adguard-home

AdGuard Home - Home Assistant Community Add-ons
https://addons.community
MIT License
378 stars 47 forks source link

DNS broken after upgrade to 4.8.8 #425

Closed awilliam closed 1 year ago

awilliam commented 1 year ago

Problem/Motivation

After upgrade from 4.8.7 to 4.8.8 DNS lookup is unreliable. For example, running:

# watch time host homeassistant 172.30.42.252

(where IP is homeassistant OS host running adguard add-on) mostly shows a timeout after update. Restoring 4.8.7 pre-update backup and restarting resolves issue.

Expected behavior

Reliable and fast DNS lookups

Actual behavior

DNS lookup failures

Steps to reproduce

Update from 4.8.7 to 4.8.8.

Proposed changes

N/A

I don't spot anything obvious in the logs to indicate the problem.

4.8.8:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: AdGuard Home
 Network-wide ads & trackers blocking DNS server
-----------------------------------------------------------
 Add-on version: 4.8.8
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.2  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.6.0
 Home Assistant Supervisor: 2023.06.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-adguard: starting
s6-rc: info: service init-nginx successfully started
s6-rc: info: service init-adguard successfully started
s6-rc: info: service adguard: starting
s6-rc: info: service adguard successfully started
s6-rc: info: service discovery: starting
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
[13:03:38] INFO: Starting AdGuard Home server...
2023/06/08 13:03:38.048040 [info] AdGuard Home, version v0.107.30
2023/06/08 13:03:38.048819 [info] AdGuard Home updates are disabled
2023/06/08 13:03:38.053027 [info] tls: using default ciphers
2023/06/08 13:03:38.059323 [info] safesearch default: disabled
2023/06/08 13:03:38.067235 [info] Initializing auth module: /data/adguard/data/sessions.db
2023/06/08 13:03:38.067811 [info] auth: initialized.  users:0  sessions:0
2023/06/08 13:03:38.068044 [info] web: initializing
2023/06/08 13:03:38.273145 [info] dnsproxy: cache: enabled, size 4096 b
2023/06/08 13:03:38.273167 [info] dnsproxy: max goroutines is set to 300
2023/06/08 13:03:38.273278 [info] AdGuard Home is available at the following addresses:
2023/06/08 13:03:38.273291 [info] go to http://127.0.0.1:45158
[13:03:38] INFO: Starting NGinx...
[13:03:38] INFO: Successfully send discovery information to Home Assistant.
s6-rc: info: service discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2023/06/08 13:03:40.147963 [info] dnsproxy: starting dns proxy server
2023/06/08 13:03:40.147998 [info] Ratelimit is enabled and set to 20 rps
2023/06/08 13:03:40.148013 [info] The server is configured to refuse ANY requests
2023/06/08 13:03:40.148023 [info] dnsproxy: cache: enabled, size 4194304 b
2023/06/08 13:03:40.148041 [info] dnsproxy: max goroutines is set to 300
2023/06/08 13:03:40.148092 [info] dnsproxy: creating udp server socket 172.30.42.252:53
2023/06/08 13:03:40.148281 [info] dnsproxy: listening to udp://172.30.42.252:53
2023/06/08 13:03:40.148303 [info] dnsproxy: creating udp server socket 172.30.32.1:53
2023/06/08 13:03:40.148418 [info] dnsproxy: listening to udp://172.30.32.1:53
2023/06/08 13:03:40.148440 [info] dnsproxy: creating udp server socket 127.0.0.1:53
2023/06/08 13:03:40.148526 [info] dnsproxy: listening to udp://127.0.0.1:53
2023/06/08 13:03:40.148548 [info] dnsproxy: creating udp server socket [::1]:53
2023/06/08 13:03:40.148645 [info] dnsproxy: listening to udp://[::1]:53
2023/06/08 13:03:40.148667 [info] dnsproxy: creating tcp server socket 172.30.42.252:53
2023/06/08 13:03:40.148762 [info] dnsproxy: listening to tcp://172.30.42.252:53
2023/06/08 13:03:40.148776 [info] dnsproxy: creating tcp server socket 172.30.32.1:53
2023/06/08 13:03:40.148849 [info] dnsproxy: listening to tcp://172.30.32.1:53
2023/06/08 13:03:40.148863 [info] dnsproxy: creating tcp server socket 127.0.0.1:53
2023/06/08 13:03:40.148933 [info] dnsproxy: listening to tcp://127.0.0.1:53
2023/06/08 13:03:40.148951 [info] dnsproxy: creating tcp server socket [::1]:53
2023/06/08 13:03:40.149036 [info] dnsproxy: listening to tcp://[::1]:53
2023/06/08 13:03:40.149469 [info] dnsproxy: entering tcp listener loop on 172.30.42.252:53
2023/06/08 13:03:40.149723 [info] dnsproxy: entering udp listener loop on 172.30.42.252:53
2023/06/08 13:03:40.150000 [info] dnsproxy: entering udp listener loop on 172.30.32.1:53
2023/06/08 13:03:40.150263 [info] dnsproxy: entering udp listener loop on 127.0.0.1:53
2023/06/08 13:03:40.150418 [info] dnsproxy: entering udp listener loop on [::1]:53
2023/06/08 13:03:40.150486 [info] dnsproxy: entering tcp listener loop on [::1]:53
2023/06/08 13:03:40.150518 [info] dnsproxy: entering tcp listener loop on 172.30.32.1:53
2023/06/08 13:03:40.150547 [info] dnsproxy: entering tcp listener loop on 127.0.0.1:53

4.8.7:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: AdGuard Home
 Network-wide ads & trackers blocking DNS server
-----------------------------------------------------------
 Add-on version: 4.8.7
 There is an update available for this add-on!
 Latest add-on version: 4.8.8
 Please consider upgrading as soon as possible.
 System: Home Assistant OS 10.2  (amd64 / generic-x86-64)
 Home Assistant Core: 2023.6.0
 Home Assistant Supervisor: 2023.06.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-nginx: starting
s6-rc: info: service init-adguard: starting
s6-rc: info: service init-nginx successfully started
s6-rc: info: service init-adguard successfully started
s6-rc: info: service adguard: starting
s6-rc: info: service adguard successfully started
s6-rc: info: service discovery: starting
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
[13:06:50] INFO: Starting AdGuard Home server...
2023/06/08 13:06:50.701163 [info] AdGuard Home, version v0.107.29
2023/06/08 13:06:50.701271 [info] AdGuard Home updates are disabled
2023/06/08 13:06:50.703884 [info] tls: using default ciphers
2023/06/08 13:06:50.706239 [info] safesearch default: disabled
2023/06/08 13:06:50.711646 [info] Initializing auth module: /data/adguard/data/sessions.db
2023/06/08 13:06:50.711746 [info] auth: initialized.  users:0  sessions:0
2023/06/08 13:06:50.711759 [info] web: initializing
2023/06/08 13:06:50.894915 [info] dnsproxy: cache: enabled, size 4096 b
2023/06/08 13:06:50.894940 [info] MaxGoroutines is set to 300
2023/06/08 13:06:50.895190 [info] AdGuard Home is available at the following addresses:
2023/06/08 13:06:50.895275 [info] go to http://127.0.0.1:45158
[13:06:51] INFO: Starting NGinx...
[13:06:51] INFO: Successfully send discovery information to Home Assistant.
s6-rc: info: service discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2023/06/08 13:06:52.393867 [info] Starting the DNS proxy server
2023/06/08 13:06:52.393883 [info] Ratelimit is enabled and set to 20 rps
2023/06/08 13:06:52.393887 [info] The server is configured to refuse ANY requests
2023/06/08 13:06:52.393891 [info] dnsproxy: cache: enabled, size 4194304 b
2023/06/08 13:06:52.393897 [info] MaxGoroutines is set to 300
2023/06/08 13:06:52.393908 [info] Creating the UDP server socket
2023/06/08 13:06:52.394034 [info] Listening to udp://172.30.42.252:53
2023/06/08 13:06:52.394041 [info] Creating the UDP server socket
2023/06/08 13:06:52.394098 [info] Listening to udp://172.30.32.1:53
2023/06/08 13:06:52.394103 [info] Creating the UDP server socket
2023/06/08 13:06:52.394136 [info] Listening to udp://127.0.0.1:53
2023/06/08 13:06:52.394141 [info] Creating the UDP server socket
2023/06/08 13:06:52.394181 [info] Listening to udp://[::1]:53
2023/06/08 13:06:52.394186 [info] Creating a TCP server socket
2023/06/08 13:06:52.394217 [info] Listening to tcp://172.30.42.252:53
2023/06/08 13:06:52.394220 [info] Creating a TCP server socket
2023/06/08 13:06:52.394236 [info] Listening to tcp://172.30.32.1:53
2023/06/08 13:06:52.394238 [info] Creating a TCP server socket
2023/06/08 13:06:52.394255 [info] Listening to tcp://127.0.0.1:53
2023/06/08 13:06:52.394258 [info] Creating a TCP server socket
2023/06/08 13:06:52.394277 [info] Listening to tcp://[::1]:53
2023/06/08 13:06:52.394346 [info] Entering the UDP listener loop on 127.0.0.1:53
2023/06/08 13:06:52.394401 [info] Entering the UDP listener loop on 172.30.42.252:53
2023/06/08 13:06:52.394451 [info] Entering the UDP listener loop on 172.30.32.1:53
2023/06/08 13:06:52.394508 [info] Entering the tcp listener loop on 172.30.42.252:53
2023/06/08 13:06:52.394534 [info] Entering the tcp listener loop on 127.0.0.1:53
2023/06/08 13:06:52.394541 [info] Entering the UDP listener loop on [::1]:53
2023/06/08 13:06:52.394595 [info] Entering the tcp listener loop on 172.30.32.1:53
2023/06/08 13:06:52.394604 [info] Entering the tcp listener loop on [::1]:53
litinoveweedle commented 1 year ago

I second this issue.

Localy defined DNS records in AdGuard 'DNS rewrites' settings works. So addon seems to be receiving client traffic and localy handling it, but seem to not send any query to my local DNS upstream server.

litinoveweedle commented 1 year ago

The problem is already confirmed for the upstream: https://github.com/AdguardTeam/AdGuardHome/issues/5873

I would propose reverting addon to AdGuard v0.107.29 until issue is resolved.

sinclairpaul commented 1 year ago

From what I can see the issue has been resolved upstream, wait for a new release.

Or alternatively if you cannot, consider changing your upstream DNS servers.

GoSpursGoNL commented 1 year ago

I had the same. However, then rolling back the addon to 4.8.7, the problem doesn't get resolved... I now really had to bypass HA/Adguard in my router DHCP settings to get stuff working.

LeandroIssa commented 1 year ago

I have the same problem, in 4.8.7 everything is ok, in 4.8.8 it keeps dropping with an error in the dns and the internet does not work. I went back to 4.8.7

litinoveweedle commented 1 year ago

I can also confirm reverting to 4.8.7 fixed the issue.

RubenNL commented 1 year ago

How can I revert to an older version of an addon? I can't find a setting for that.

frenck commented 1 year ago

Just released v4.8.9 of the add-on.

../Frenck

RubenNL commented 1 year ago

I can confirm the v4.8.9 addon is working.

frenck commented 1 year ago

Good! I'll close up this issue in that case 👍

../Frenck

Nbr1Sniper commented 1 year ago

This is still an issue after the update to 4.8.9. After about 30 min to an hour I start dropping again.

peter1960 commented 1 year ago

This problem is still occurring; https://github.com/hassio-addons/addon-adguard-home/issues/427