hassio-addons / addon-adguard-home

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

AdGuard only listens on 127.0.0.1 #499

Closed lupino3 closed 2 months ago

lupino3 commented 3 months ago

Problem/Motivation

I just installed AdGuard home, and it only listens to 127.0.0.1.

image

This happens both with DHCP-supplied HA IP and with static HA IP. I also tried reinstalling the add-on when my HA had static ip, but it doesn't seem to get the correct IP from the supervisor.

HA details:

Home Assistant

Core 2024.3.0
Supervisor 2024.02.1
Operating System 12.0
Frontend 20240306.0

Running on Home Assistant Yellow.

Logs:

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: 5.0.3
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.0  (aarch64 / yellow)
 Home Assistant Core: 2024.3.0
 Home Assistant Supervisor: 2024.02.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
[11:55:36] INFO: Starting AdGuard Home server...
2024/03/11 11:55:36 [error] Couldn't get logging settings from the configuration: yaml: unmarshal errors:
  line 3: cannot unmarshal !!str `1.1.1.1:53` into []string
2024/03/11 11:55:36.167978 [info] AdGuard Home, version v0.107.44
2024/03/11 11:55:36.168526 [info] Upgrade yaml: 0 to 1
2024/03/11 11:55:36.168572 [info] deleting /data/adguard/dnsfilter.txt as we don't need it anymore
2024/03/11 11:55:36.168653 [info] Upgrade yaml: 1 to 2
2024/03/11 11:55:36.168671 [info] deleting /data/adguard/Corefile as we don't need it anymore
2024/03/11 11:55:36.168700 [info] Upgrade yaml: 2 to 3
2024/03/11 11:55:36.168712 [info] Upgrade yaml: 3 to 4
2024/03/11 11:55:36.168721 [info] Upgrade yaml: 4 to 5
2024/03/11 11:55:36.168730 [info] Upgrade yaml: 5 to 6
2024/03/11 11:55:36.168738 [info] Upgrade yaml: 6 to 7
2024/03/11 11:55:36.168745 [info] Upgrade yaml: 7 to 8
2024/03/11 11:55:36.168756 [info] Upgrade yaml: 8 to 9
2024/03/11 11:55:36.168764 [info] Upgrade yaml: 9 to 10
2024/03/11 11:55:36.168773 [info] Upgrade yaml: 10 to 11
2024/03/11 11:55:36.168783 [info] Upgrade yaml: 11 to 12
2024/03/11 11:55:36.168791 [info] Upgrade yaml: 12 to 13
2024/03/11 11:55:36.168799 [info] Upgrade yaml: 13 to 14
2024/03/11 11:55:36.168811 [info] Upgrade yaml: 14 to 15
2024/03/11 11:55:36.168834 [info] Upgrade yaml: 15 to 16
2024/03/11 11:55:36.168895 [info] Upgrade yaml: 16 to 17
2024/03/11 11:55:36.168910 [info] Upgrade yaml: 17 to 18
2024/03/11 11:55:36.168921 [info] Upgrade yaml: 18 to 19
2024/03/11 11:55:36.168929 [info] Upgrade yaml: 19 to 20
2024/03/11 11:55:36.168937 [info] Upgrade yaml: 20 to 21
2024/03/11 11:55:36.168947 [info] Upgrade yaml: 21 to 22
2024/03/11 11:55:36.168954 [info] Upgrade yaml: 22 to 23
2024/03/11 11:55:36.168961 [info] Upgrade yaml: 23 to 24
2024/03/11 11:55:36.168970 [info] Upgrade yaml: 24 to 25
2024/03/11 11:55:36.168978 [info] Upgrade yaml: 25 to 26
2024/03/11 11:55:36.168992 [info] Upgrade yaml: 26 to 27
2024/03/11 11:55:36.169001 [info] Upgrade yaml: 27 to 28
2024/03/11 11:55:36.175414 [info] tls: using default ciphers
2024/03/11 11:55:36.183621 [info] safesearch default: reset 253 rules
2024/03/11 11:55:36.191734 [info] Initializing auth module: /data/adguard/data/sessions.db
2024/03/11 11:55:36.195719 [info] auth: initialized.  users:0  sessions:0
2024/03/11 11:55:36.195780 [info] AdGuard Home updates are disabled
2024/03/11 11:55:36.195827 [info] web: initializing
2024/03/11 11:55:36.202639 [info] dnsproxy: cache: enabled, size 4096 b
2024/03/11 11:55:36.202687 [info] dnsproxy: max goroutines is set to 300
2024/03/11 11:55:36.203592 [info] dnsproxy: cache: disabled
2024/03/11 11:55:36.204084 [info] clients: processing addresses
2024/03/11 11:55:36.204583 [info] AdGuard Home is available at the following addresses:
2024/03/11 11:55:36.205623 [info] go to http://127.0.0.1:45158
2024/03/11 11:55:36.213733 [info] dnsproxy: starting dns proxy server
2024/03/11 11:55:36.213835 [info] Ratelimit is enabled and set to 20 rps, IPv4 subnet mask len 24, IPv6 subnet mask len 56
2024/03/11 11:55:36.213850 [info] The server is configured to refuse ANY requests
2024/03/11 11:55:36.213859 [info] dnsproxy: cache: enabled, size 4194304 b
2024/03/11 11:55:36.213880 [info] dnsproxy: max goroutines is set to 300
2024/03/11 11:55:36.213917 [info] dnsproxy: creating udp server socket 127.0.0.1:53
2024/03/11 11:55:36.214166 [info] dnsproxy: listening to udp://127.0.0.1:53
2024/03/11 11:55:36.214197 [info] dnsproxy: creating tcp server socket 127.0.0.1:53
2024/03/11 11:55:36.214323 [info] dnsproxy: listening to tcp://127.0.0.1:53
2024/03/11 11:55:36.214592 [info] dnsproxy: entering udp listener loop on 127.0.0.1:53
2024/03/11 11:55:36.214961 [info] dnsproxy: entering tcp listener loop on 127.0.0.1:53
[11:55:36] INFO: Starting NGinx...
[11:55:36] 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
2024/03/11 11:55:42.097354 [info] filtering: saving contents of filter 1 into "/data/adguard/data/filters/1.txt"
2024/03/11 11:55:42.111645 [info] filtering: updated filter 1: 1257813 bytes, 63102 rules
2024/03/11 11:55:42.111701 [info] filtering: updated filter 1; rule count: 63102 (was 0)

Expected behavior

It should also listen on HA's IP.

Actual behavior

It only listens to 127.0.0.1.

Steps to reproduce

I just installed the add-on, no steps to reproduce.

Proposed changes

Not sure.

lupino3 commented 3 months ago

@frenck I think I fixed this by addressing this line in the logs:

2024/03/11 11:55:36 [error] Couldn't get logging settings from the configuration: yaml: unmarshal errors:
  line 3: cannot unmarshal !!str `1.1.1.1:53` into []string

This was AdGuard not being able to parse the default upstream DNS of 1.1.1.1:53. Once I changed that to 1.1.1.1 the error disappeared and AdGuard listens to all addresses as expected.

github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!