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

[fatal] couldn't start forwarding DNS server #385

Closed
naked-head opened this issue Jan 20, 2023 · 74 comments
Closed

[fatal] couldn't start forwarding DNS server #385

naked-head opened this issue Jan 20, 2023 · 74 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@naked-head
Copy link

Problem/Motivation

After upgrading to new versione I got this error
[fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp 127.0.0.1:53: bind: address already in use

Environment:

Supervised on Debian 11 Kernel 5.10.158-2
Supervisor 2022.12.1
Home Assistant 2023.1.6

I tried to restore to previous version and the addon is function again, so I upgraded again and got same error.

Steps to reproduce

Upgrading to latest version

@patanachai
Copy link

patanachai commented Jan 20, 2023

Facing the same problem with a little-bit different error for me. it is

listen udp [::1]:53: bind: cannot assign requested address

This change makes it looking for ::1 even IPv6 is disable.

@KruseLuds
Copy link

KruseLuds commented Jan 20, 2023

I have the same issue and had to revert back to Adguard Home 4.7.6 from 4.8.0 due to this error message:

[fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp 127.0.0.1:53: bind: address already in use

Also, this file (BEFORE UPGRADING FROM 4.7.6 to 4.8.0):

/usr/share/hassio/addons/data/a0d7b954_adguard/adguard/AdGuardHome.yaml contents are:

bind_host: 127.0.0.1
bind_port: 45158
beta_bind_port: 0
users: []
auth_attempts: 5
block_auth_min: 15
http_proxy: ""
language: ""
debug_pprof: false
web_sesion_ttl: 720
dns:
  bind_hosts:
    - 192.168.0.34
    - 172.30.32.1

Note, when I upgrade to 4.8.0, the above file appears to be the same except the bind_hosts section changes to only the IP address 127.0.0.1 - and I saw in suport forums in the past that people would change it to 0.0.0.0 and restart Adguard and it would then change to the host IP where adguard is running (in my case an RPI 4B 8G RAM w/a 1TB SSD Home Assistant Supervised which has the IP address 192.168.0.34). I am NOT using adguard as a dhcp server. I also tried changing the AdGuardHome.yaml to include the two IP addresses above and restart it - but the section in the file just changes to the one entry 192.168.0.34 - and also still has the same error message about port 53.

BTW, I did a search as it looked like the port 53 was already being used by something else and all I could find for processes using port 53 was systemd_resolved but I think that was leading me down a rabbit hole as it wasn't really the issue - nothing else had changed in the configuration....

(BTW I also tried temporarily disabling the core_dns_override addon but that made zero difference.)

Here is my setup currently:

## System Information

version | core-2023.1.6
-- | --
installation_type | Home Assistant Supervised
dev | false
hassio | true
docker | true
user | root
virtualenv | false
python_version | 3.10.7
os_name | Linux
os_version | 5.10.0-20-arm64
arch | aarch64
timezone | America/New_York
config_dir | /config

<details><summary>Home Assistant Community Store</summary>

GitHub API | ok
-- | --
GitHub Content | ok
GitHub Web | ok
GitHub API Calls Remaining | 4698
Installed Version | 1.29.1
Stage | running
Available Repositories | 1266
Downloaded Repositories | 23

</details>

<details><summary>AccuWeather</summary>

can_reach_server | ok
-- | --
remaining_requests | 6

</details>

<details><summary>Home Assistant Cloud</summary>

logged_in | false
-- | --
can_reach_cert_server | ok
can_reach_cloud_auth | ok
can_reach_cloud | ok

</details>

<details><summary>Home Assistant Supervisor</summary>

host_os | Debian GNU/Linux 11 (bullseye)
-- | --
update_channel | stable
supervisor_version | supervisor-2022.12.1
agent_version | 1.4.1
docker_version | 20.10.22
disk_total | 915.4 GB
disk_used | 14.0 GB
healthy | true
supported | true
supervisor_api | ok
version_api | ok
installed_addons | AppDaemon (0.11.0), Core DNS Override (0.1.1), Duck DNS (1.15.0), File editor (5.5.0), Home Assistant Google Drive Backup (0.110.1), Log Viewer (0.14.0), Mosquitto broker (6.1.3), Samba share (10.0.0), Terminal & SSH (9.6.1), AdGuard Home (4.7.6)

</details>

<details><summary>Dashboards</summary>

dashboards | 4
-- | --
resources | 15
views | 31
mode | storage

</details>

<details><summary>Recorder</summary>

oldest_recorder_run | December 20, 2022 at 5:06 PM
-- | --
current_recorder_run | January 20, 2023 at 4:25 PM
estimated_db_size | 2239.96 MiB
database_engine | sqlite
database_version | 3.38.5

</details>

@InToSSH
Copy link

InToSSH commented Jan 21, 2023

Facing the same problem with a little-bit different error for me. it is

listen udp [::1]:53: bind: cannot assign requested address

This change makes it looking for ::1 even IPv6 is disable.

I have exactly the same problem after the upgrade. Is there a way to manually specify the bind_hosts? If I rewrite the AdGuardHome.yaml file, it gets rewritten again when the addon starts.

@naked-head
Copy link
Author

naked-head commented Jan 21, 2023

Facing the same problem with a little-bit different error for me. it is

listen udp [::1]:53: bind: cannot assign requested address

This change makes it looking for ::1 even IPv6 is disable.

Searching with netstat -tulpn | grep ":53 " I found the guilty: in supervised we use ConnMan to listen to 127.0.0.1:53.

The solution may be to add this function to the changed file

def check_port():
    import socket, errno
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:        s.bind(("127.0.0.1",53))
    except socket.error as e:
        if e.errno == errno.EADDRINUSE:
            return False
        else:
            return True   
    s.close()

and then, the actual row 60, change like this:

if check_port():
   hosts+=("127.0.0.1")
   hosts+=("::1")

or something like that

@uroh
Copy link

uroh commented Jan 21, 2023

I have the same problem, i downgraded the addon to restore adguard. The system has the following configuration: fixed ip 192.168.2.51/32, gw 192.168.2.1, dns 192.168.2.51, ipv6 disabled, router 192.168.2.1 with dns server 192.168.2.51. With version 4.7.8 everything works perfectly.

@rucanunes
Copy link

Same problem.

@naked-head
Copy link
Author

Meanwhile I found a server configuration solution:
Changing my ConnMan systemd configuration, in file /etc/systemd/system/multi-user.target.wants/connman.service I changed the row ExecStart=/usr/sbin/connmand -n to ExecStart=/usr/sbin/connmand -n -r.
After that I had to restart the system and finally upgraded to new version of AdGuard that can listen to 127.0.0.1:53.

@uroh
Copy link

uroh commented Jan 21, 2023

I am happy for you!
In my case I have not installed ConnMan systemd in my distribution (armbian), in other words there is no connman.service file to edit.

@uroh
Copy link

uroh commented Jan 21, 2023

Anyway with version 4.7.8 everything works perfectly and adguard listens in the following ports:
tcp 0 0 192.168.2.51:53 0.0.0.0:* LISTEN 77750/./AdGuardHome
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 839/systemd-resolve
tcp 0 0 172.30.32.1:53 0.0.0.0:* LISTEN 77750/./AdGuardHome
udp 0 0 172.30.32.1:53 0.0.0.0:* 77750/./AdGuardHome
udp 0 0 192.168.2.51:53 0.0.0.0:* 77750/./AdGuardHome
udp 0 0 127.0.0.53:53 0.0.0.0:* 839/systemd-resolve

With version 4.8 I have the same problem as @patanachai with the following message in the log: "listen udp [::1]:53: bind: cannot assign requested address"

@tjorim
Copy link
Contributor

tjorim commented Jan 21, 2023

I am happy for you!
In my case I have not installed ConnMan systemd in my distribution (armbian), in other words there is no connman.service file to edit.

@uroh armbian is not a supported installation method.

@tjorim
Copy link
Contributor

tjorim commented Jan 21, 2023

Meanwhile I found a server configuration solution:
Changing my ConnMan systemd configuration, in file /etc/systemd/system/multi-user.target.wants/connman.service I changed the row ExecStart=/usr/sbin/connmand -n to ExecStart=/usr/sbin/connmand -n -r.
After that I had to restart the system and finally upgraded to new version of AdGuard that can listen to 127.0.0.1:53.

@naked-head good catch. Home assistant supervisor only supports NetworkManager anyway, so your installation is not supported anyway.

@tjorim
Copy link
Contributor

tjorim commented Jan 21, 2023

It would probably help us troubleshoot better if people post their system information: settings -> system -> repairs -> the three dots in the top right -> system information -> copy button in the bottom right.

@naked-head
Copy link
Author

It would probably help us troubleshoot better if people post their system information: settings -> system -> repairs -> the three dots in the top right -> system information -> copy button in the bottom right.

I honestly don't know why I have ConnMan, I thought it was a homeassistant dependence. I did a fresh clean install with Homeassistant Supervised and nothing more....I will investigate on it...

Anyway the solution, if no change are made to this new version, is to stop the service (whatever it is) that lock the socket.

that's my system:

System Information

version core-2023.1.6
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.7
os_name Linux
os_version 5.10.0-20-amd64
arch x86_64
timezone Europe/Rome
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4999
Installed Version 1.29.1
Stage running
Available Repositories 1267
Downloaded Repositories 69
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 11 (bullseye)
update_channel stable
supervisor_version supervisor-2022.12.1
agent_version 1.4.1
docker_version 20.10.23
disk_total 204.7 GB
disk_used 12.4 GB
healthy true
supported true
supervisor_api ok
version_api ok
installed_addons Samba share (10.0.0), Home Assistant Google Drive Backup (0.110.1), Vaultwarden (Bitwarden) (0.19.0), AdGuard Home (4.8.0), Mosquitto broker (6.1.3), Log Viewer (0.14.0), MariaDB (2.5.1), phpMyAdmin (0.8.3), Studio Code Server (5.5.1), SSH & Web Terminal (13.0.2), Scrutiny (v0.6.0), Nginx Proxy Manager (0.12.3), Nextcloud (25.0.0-10), Portainer (2.16.2)
Dashboards
dashboards 4
resources 41
views 15
mode storage
Recorder
oldest_recorder_run January 11, 202312:22
current_recorder_run January 11, 2023 16:07
estimated_db_size 667.41 MiB
database_engine sqlite
database_version 3.38.5

@InToSSH
Copy link

InToSSH commented Jan 22, 2023

Here is my system info for troubleshooting. For the time being I reverted back to the older version. If you need more specific info I would be happy to provide that.

System Information

version core-2023.1.5
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.7
os_name Linux
os_version 5.10.0-20-amd64
arch x86_64
timezone Europe/Prague
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4465
Installed Version 1.29.0
Stage running
Available Repositories 1272
Downloaded Repositories 37
Home Assistant Cloud
logged_in true
subscription_expiration January 6, 2024 at 01:00
relayer_connected true
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled true
remote_server eu-central-1-2.ui.nabu.casa
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 11 (bullseye)
update_channel stable
supervisor_version supervisor-2022.12.1
agent_version 1.4.1
docker_version 20.10.22
disk_total 191.4 GB
disk_used 76.0 GB
healthy true
supported true
supervisor_api ok
version_api ok
installed_addons Terminal & SSH (9.6.1), Samba share (10.0.0), File editor (5.5.0), Check Home Assistant configuration (3.11.0), Node-RED (14.0.1), Mosquitto broker (6.1.3), ESPHome (2022.12.3), InfluxDB (4.5.0), Grafana (8.1.0), AppDaemon (0.11.0), MariaDB (2.5.1), phpMyAdmin (0.8.3), TasmoAdmin (0.23.0), AdGuard Home (4.7.6), Amcrest2mqtt (1.0.16.1), Uptime Kuma (0.5.2), Let's Encrypt (4.12.7), Home Assistant Google Drive Backup (0.110.1), EMQX (0.2.1)
Dashboards
dashboards 3
resources 15
views 9
mode storage
Recorder
oldest_recorder_run December 28, 2022 at 01:51
current_recorder_run January 21, 2023 at 00:54
database_engine mysql
database_version 10.6.8
Sonoff
version 3.3.1 (b20e33c)
cloud_online 2 / 3
local_online 0 / 0
Spotify
api_endpoint_reachable ok
Xiaomi Miot Auto
component_version 0.7.4
can_reach_server ok
can_reach_spec ok
logged_accounts 1
total_devices 3

@uroh
Copy link

uroh commented Jan 22, 2023

Thank you @tjorim for the valuable contribution. However, I have taken the liberty of writing to request a different type of contribution aimed at resolving a problem that was not present in the previous version. Perhaps the implementation of binding to localhost is only oriented towards specific supported distributions or, perhaps, it contains some imperfections! In any case, I will be publishing the specifications of my unsupported server:

System Information

version core-2023.1.6
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.7
os_name Linux
os_version 5.15.85-flippy-80+o
arch aarch64
timezone Europe/Rome
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.29.1
Stage running
Available Repositories 1204
Downloaded Repositories 44
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 11 (bullseye)
update_channel stable
supervisor_version supervisor-2022.12.1
agent_version 1.4.1
docker_version 20.10.22
disk_total 119.2 GB
disk_used 23.0 GB
healthy true
supported failed to load: Unsupported
supervisor_api ok
version_api ok
installed_addons AdGuard Home (4.7.6), Bookstack (1.4.0), Caddy 2 (1.3.1), File editor (5.5.0), Grafana (8.1.0), Home Assistant Google Drive Backup (0.110.1), InfluxDB (4.5.0), Terminal & SSH (9.6.1), WireGuard (0.7.1), Zigbee2MQTT (1.29.2-1), Node-RED (14.0.1), ESPHome (2022.12.3), MariaDB (2.5.1), phpMyAdmin (0.8.3)
Dashboards
dashboards 1
resources 27
views 7
mode storage
NextDNS
can_reach_server ok
Recorder
oldest_recorder_run 15 gennaio 2023 07:52
current_recorder_run 20 gennaio 2023 16:41
estimated_db_size 106.86 MiB
database_engine mysql
database_version 10.6.8
Sonoff
version 3.3.1 (b20e33c)
cloud_online 0 / 6
local_online 4 / 4
Xiaomi Miot Auto
component_version 0.7.5
can_reach_server ok
can_reach_spec ok
logged_accounts 1
total_devices 2

@sysadmin-info
Copy link

sysadmin-info commented Jan 22, 2023

Hi,

I have the same issue:

2023/01/22 09:09:05.912562 [fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp [::1]:53: bind: cannot assign requested address
[09:09:05] INFO: Service Adguard Home exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service discovery: stopping
s6-rc: info: service nginx: stopping
s6-rc: info: service discovery successfully stopped
[09:09:06] INFO: Starting AdGuard Home server...
2023/01/22 09:09:06.087628 [info] AdGuard Home, version v0.107.22
2023/01/22 09:09:06.087802 [info] AdGuard Home updates are disabled
2023/01/22 09:09:06.094936 [info] tls: using default ciphers
2023/01/22 09:09:06.105808 [info] Initializing auth module: /data/adguard/data/sessions.db
2023/01/22 09:09:06.106261 [info] auth: initialized. users:0 sessions:0
2023/01/22 09:09:06.106432 [info] tls: number of certs: 1
[09:09:06] INFO: Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service init-nginx: stopping
s6-rc: info: service adguard: stopping
s6-rc: info: service init-nginx successfully stopped
2023/01/22 09:09:06.154138 [info] Received signal "terminated"
2023/01/22 09:09:06.154174 [info] stopping AdGuard Home
2023/01/22 09:09:06.162480 [info] web: initializing
2023/01/22 09:09:06.169438 [info] stopped
[09:09:06] INFO: Service Adguard Home exited with code 0 (by signal 0)
s6-rc: info: service adguard successfully stopped
s6-rc: info: service init-adguard: stopping
s6-rc: info: service init-adguard successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

23-01-22 09:43:38 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon AdGuard Home is failed, restarting...
23-01-22 09:43:38 INFO (SyncWorker_6) [supervisor.docker.interface] Cleaning addon_a0d7b954_adguard application
23-01-22 09:43:39 INFO (SyncWorker_7) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/adguard/aarch64 with version 4.8.0
23-01-22 09:43:42 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from a0d7b954_adguard
23-01-22 09:43:43 INFO (MainThread) [supervisor.api.middleware.security] /network/interface/eth0/info access from a0d7b954_adguard
23-01-22 09:43:47 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state CoreState.RUNNING
23-01-22 09:43:48 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
23-01-22 09:43:49 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/hassio-addons/repository repository
23-01-22 09:43:49 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/esphome/home-assistant-addon repository
23-01-22 09:43:49 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/brenner-tobias/ha-addons repository
23-01-22 09:43:49 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/sabeechen/hassio-google-drive-backup repository
23-01-22 09:43:49 INFO (MainThread) [supervisor.store.git] Update add-on https://github.com/home-assistant/addons repository
23-01-22 09:43:49 INFO (MainThread) [supervisor.updater] Fetching update data from https://version.home-assistant.io/stable.json
23-01-22 09:43:50 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/sentry_sdk/integrations/aiohttp.py", line 126, in sentry_app_handle
reraise(*_capture_exception(hub))
File "/usr/local/lib/python3.10/site-packages/sentry_sdk/_compat.py", line 57, in reraise
raise value
File "/usr/local/lib/python3.10/site-packages/sentry_sdk/integrations/aiohttp.py", line 116, in sentry_app_handle
response = await old_handle(self, request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 138, in system_validation
return await handler(request)
File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 204, in token_validation
return await handler(request)
File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api
answer = await method(api, *args, **kwargs)
File "/usr/src/supervisor/supervisor/api/store.py", line 178, in store_info
ATTR_ADDONS: [
File "/usr/src/supervisor/supervisor/api/store.py", line 179, in
self._generate_addon_information(self.sys_addons.store[addon])
File "/usr/src/supervisor/supervisor/api/store.py", line 114, in _generate_addon_information
ATTR_ADVANCED: addon.advanced,
File "/usr/src/supervisor/supervisor/addons/model.py", line 221, in advanced
return self.data[ATTR_ADVANCED]
File "/usr/src/supervisor/supervisor/store/addon.py", line 19, in data
return self.sys_store.data.addons[self.slug]
KeyError: 'core_cec_scan'
23-01-22 09:43:52 INFO (MainThread) [supervisor.store] Loading add-ons from store: 70 all - 0 new - 0 remove
23-01-22 09:43:52 INFO (MainThread) [supervisor.store] Loading add-ons from store: 70 all - 0 new - 0 remove
23-01-22 09:43:59 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon AdGuard Home is failed, restarting...
23-01-22 09:43:59 INFO (SyncWorker_4) [supervisor.docker.interface] Cleaning addon_a0d7b954_adguard application
23-01-22 09:43:59 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/adguard/aarch64 with version 4.8.0
23-01-22 09:44:02 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from a0d7b954_adguard
23-01-22 09:44:03 INFO (MainThread) [supervisor.api.middleware.security] /network/interface/eth0/info access from a0d7b954_adguard
23-01-22 09:44:09 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
23-01-22 09:44:19 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon AdGuard Home is failed, restarting...
23-01-22 09:44:19 INFO (SyncWorker_1) [supervisor.docker.interface] Cleaning addon_a0d7b954_adguard application
23-01-22 09:44:19 INFO (SyncWorker_6) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/adguard/aarch64 with version 4.8.0
23-01-22 09:44:22 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from a0d7b954_adguard
23-01-22 09:44:22 INFO (MainThread) [supervisor.api.middleware.security] /network/interface/eth0/info access from a0d7b954_adguard
23-01-22 09:44:38 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-2338' coro=<Addon.watchdog_container() done, defined at /usr/src/supervisor/supervisor/addons/addon.py:988> exception=AddonsJobError('Rate limit exceeded, more then 10 calls in 0:30:00')>
Traceback (most recent call last):
File "/usr/src/supervisor/supervisor/addons/addon.py", line 1002, in watchdog_container
await self._restart_after_problem(self, event.state)
File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 144, in wrapper
raise on_condition(
supervisor.exceptions.AddonsJobError: Rate limit exceeded, more then 10 calls in 0:30:00

Debian 11 kernel version: 5.15.84-v8+
Docker version: 20.10.22, build 3a2c30b
Supervisor: 2022.12.1
Home Assistant: 2023.1.6
Core: 2023.1.6
Adguard Home addon version: 4.8.0

[root@raspberrypi:~]# ss -tulpen | grep ":53 "
udp UNCONN 0 0 172.30.32.1:53 0.0.0.0:* users:(("AdGuardHome",pid=4480,fd=46))
udp UNCONN 0 0 10.10.0.100:53 0.0.0.0:* users:(("AdGuardHome",pid=4480,fd=45))
udp UNCONN 0 0 127.0.0.53:53 0.0.0.0:* users:(("systemd-resolve",pid=446,fd=16))
tcp LISTEN 0 4096 172.30.32.1:53 0.0.0.0:* users:(("AdGuardHome",pid=4480,fd=49)) ino:19438 sk:b cgroup:/docker/f2403bee533dfd7202f2c2da8c528dcc1987c97cfa833e7d2514718d38142fb1 <->
tcp LISTEN 0 4096 10.10.0.100:53 0.0.0.0:* users:(("AdGuardHome",pid=4480,fd=48)) ino:19437 sk:c cgroup:/docker/f2403bee533dfd7202f2c2da8c528dcc1987c97cfa833e7d2514718d38142fb1 <->
tcp LISTEN 0 4096 127.0.0.53%lo:53 0.0.0.0:* users:(("systemd-resolve",pid=446,fd=17)) uid:103 ino:8910 sk:d cgroup:/system.slice/systemd-resolved.service <->

[root@raspberrypi:~]# systemctl status systemd-resolved.service
● systemd-resolved.service - Network Name Resolution
Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2023-01-22 19:16:16 CET; 7s ago
Docs: man:systemd-resolved.service(8)
man:org.freedesktop.resolve1(5)
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Main PID: 31609 (systemd-resolve)
Status: "Processing requests..."
Tasks: 1 (limit: 8985)
CGroup: /system.slice/systemd-resolved.service
└─31609 /lib/systemd/systemd-resolved

Jan 22 19:16:16 raspberrypi systemd[1]: Starting Network Name Resolution...
Jan 22 19:16:16 raspberrypi systemd-resolved[31609]: Positive Trust Anchors:
Jan 22 19:16:16 raspberrypi systemd-resolved[31609]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Jan 22 19:16:16 raspberrypi systemd-resolved[31609]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.>Jan 22 19:16:16 raspberrypi systemd-resolved[31609]: Using system hostname 'raspberrypi'.
Jan 22 19:16:16 raspberrypi systemd-resolved[31609]: mDNS-IPv4: There appears to be another mDNS responder running, or previously systemd-resolved crashed with some outstanding tra>Jan 22 19:16:16 raspberrypi systemd-resolved[31609]: mDNS-IPv6: There appears to be another mDNS responder running, or previously systemd-resolved crashed with some outstanding tra>Jan 22 19:16:16 raspberrypi systemd[1]: Started Network Name Resolution.

Any logic explanation why this localhost change has been provided? I do not see any option to disable it on Adguard Home addon level in Home Assistant Supervised.

@naked-head
Copy link
Author

@naked-head good catch. Home assistant supervisor only supports NetworkManager anyway, so your installation is not supported anyway.

Today I have removed ConnMan going back to NetworkManager, my installation is now supported. AdGuard is still working even uninstalling I removed the only change I played in systemd configuration file of ConnMan, so with supported installation everything work well.

Anyway I think that would be better if people can choose if AdGuard can listen on localhost or not. Using the correction I suggested before, or better adding a new configuration parameter.

@InToSSH
Copy link

InToSSH commented Jan 22, 2023

Just to add to this issue, unlike @naked-head I am not using ConnMan, but I have NetworkManager, my installation should be supported running on Debian 11. Yet I still get this error, exactly this one:

listen udp [::1]:53: bind: cannot assign requested address

So I don't think it is only the ConnMan causing that. My only help was to revert back to the older version.
I checked what is listening on port 53 and I get this:

tcp        0      0 172.30.32.1:53          0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.3.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.2.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.1.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      330/systemd-resolve
tcp6       0      0 fd4e:xxxx:xxxx:1:xxx:53 :::*                    LISTEN      20436/./AdGuardHome
tcp6       0      0 2a06:xxxx:xxxx:xxxx::53 :::*                    LISTEN      20436/./AdGuardHome

@sysadmin-info
Copy link

I am going to test the solution for the systemd-resolved from here: https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#why-am-i-getting-bind-address-already-in-use-error-when-trying-to-install-on-ubuntu

I am using Debian 11 and I observed the same behavior. Probably when I will disable the service, Supervised will inform me that I am running unsuppoeted version. :) But I can live with it.

@InToSSH
Copy link

InToSSH commented Jan 22, 2023

@sysadmin-info I tried your solution, but that unfortunately didn't help.
I still get the same error, this is the log:

2023/01/22 19:56:32.553891 [info] Creating the UDP server socket
2023/01/22 19:56:32.554249 [info] Listening to udp://10.10.1.10:53
2023/01/22 19:56:32.554372 [info] Creating the UDP server socket
2023/01/22 19:56:32.555258 [info] Listening to udp://[2a06:xxxx:xxxx:xxxx:1755:xxxx:xxxx:xxxx]:53
2023/01/22 19:56:32.555490 [info] Creating the UDP server socket
2023/01/22 19:56:32.555720 [info] Listening to udp://[fd4e:xxxx:xxxx:1:8f7f:[xxxx:xxxx:9048](xxxx:xxxx:xxxx)]:53
2023/01/22 19:56:32.555886 [info] Creating the UDP server socket
2023/01/22 19:56:32.556116 [info] Listening to udp://10.10.2.10:53
2023/01/22 19:56:32.556228 [info] Creating the UDP server socket
2023/01/22 19:56:32.556490 [info] Listening to udp://10.10.3.10:53
2023/01/22 19:56:32.556608 [info] Creating the UDP server socket
2023/01/22 19:56:32.557098 [info] Listening to udp://172.30.32.1:53
2023/01/22 19:56:32.557231 [info] Creating the UDP server socket
2023/01/22 19:56:32.557697 [info] Listening to udp://127.0.0.1:53
2023/01/22 19:56:32.557829 [info] Creating the UDP server socket
2023/01/22 19:56:32.581014 [fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp [::1]:53: bind: cannot assign requested address

Only now the 127.0.0.53:53 is gone from the netstat:

tcp        0      0 172.30.32.1:53          0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.3.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.2.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.1.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp6       0      0 fd4e:xxxx:xxxx:1:xxx:53 :::*                    LISTEN      20436/./AdGuardHome
tcp6       0      0 2a06:xxxx:xxxx:xxxx::53 :::*                    LISTEN      20436/./AdGuardHome

This is running the old version after your suggestion. Of course after upgrade there is nothing coming up because Adguard won't start.

@caraar12345
Copy link

@InToSSH have you tried running netstat -tulpn?

The issue is binding UDP port 53; your netstat is only showing TCP

@InToSSH
Copy link

InToSSH commented Jan 23, 2023

@caraar12345 Yes, sorry, I just copied the wrong part. This is what it looks like after disabling systemd-resolved by applying the fix from AdGuard wiki:

  root@loki:/etc/systemd/resolved.conf.d# netstat -tulpn | grep ":53 "
tcp        0      0 172.30.32.1:53          0.0.0.0:*               LISTEN      367374/./AdGuardHom
tcp        0      0 10.10.3.10:53           0.0.0.0:*               LISTEN      367374/./AdGuardHom
tcp        0      0 10.10.2.10:53           0.0.0.0:*               LISTEN      367374/./AdGuardHom
tcp        0      0 10.10.1.10:53           0.0.0.0:*               LISTEN      367374/./AdGuardHom
tcp6       0      0 fd4e:xxxx:xxxx:8f7:53 :::*                    LISTEN      367374/./AdGuardHom
tcp6       0      0 2a06:xxxx:xxxx:3781::53 :::*                    LISTEN      367374/./AdGuardHom
udp        0      0 172.30.32.1:53          0.0.0.0:*                           367374/./AdGuardHom
udp        0      0 10.10.3.10:53           0.0.0.0:*                           367374/./AdGuardHom
udp        0      0 10.10.2.10:53           0.0.0.0:*                           367374/./AdGuardHom
udp        0      0 10.10.1.10:53           0.0.0.0:*                           367374/./AdGuardHom
udp6       0      0 fd4e:xxxxxxxxxx:53 :::*                                367374/./AdGuardHom
udp6       0      0 2a06:xxxxx:3781::53 :::*                                367374/./AdGuardHom

The result is the same. After the AdGuard update the above command doesn't return anything.

EDIT: I think I found some lead on what might be causing the issue. I checked the ip addr show and noticed that the loopback interface doesn't have the ::1 address, can't even ping it. So I checked the /etc/sysctl.conf file and found (which I completely forgot I did this in the past) I had this:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

for some reason even with this my main interface was getting IPv6 address, but the loopback doesn't seem to have it.
I will do some testing tomorrow, but I think either way the AdGuard should realize there is no ::1 IP on the interface and shouldn't try to bind to it.

@uroh
Copy link

uroh commented Jan 25, 2023

Just to add to this issue, unlike @naked-head I am not using ConnMan, but I have NetworkManager, my installation should be supported running on Debian 11. Yet I still get this error, exactly this one:

listen udp [::1]:53: bind: cannot assign requested address

So I don't think it is only the ConnMan causing that. My only help was to revert back to the older version. I checked what is listening on port 53 and I get this:

tcp        0      0 172.30.32.1:53          0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.3.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.2.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 10.10.1.10:53           0.0.0.0:*               LISTEN      20436/./AdGuardHome
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      330/systemd-resolve
tcp6       0      0 fd4e:xxxx:xxxx:1:xxx:53 :::*                    LISTEN      20436/./AdGuardHome
tcp6       0      0 2a06:xxxx:xxxx:xxxx::53 :::*                    LISTEN      20436/./AdGuardHome

Is it correct/normal to have the address 127.0.0.53:53? Shouldn't it be 127.0.0.1:53?

@InToSSH
Copy link

InToSSH commented Jan 25, 2023

Is it correct/normal to have the address 127.0.0.53:53? Shouldn't it be 127.0.0.1:53?

Yes that is a normal behavior of systemd-resolved. The 127 A Class network is a loopback network a basically you can use anything in that subnet and it will work, so you can even ping 127.52.11.252 and it will work. Why they chose 53 instead 1.. I don't know.

@uroh
Copy link

uroh commented Jan 26, 2023

@InToSSH, Looks like you've been to my house as well, as I've discovered a similar setup on my server. I took this opportunity to get my distro running smoothly with the home assistant. It is now fully supported except for the installation process. :)

System Information

version core-2023.1.7
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.7
os_name Linux
os_version 5.15.85-flippy-80+o
arch aarch64
timezone Europe/Rome
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4642
Installed Version 1.30.0
Stage running
Available Repositories 1204
Downloaded Repositories 43
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 11 (bullseye)
update_channel stable
supervisor_version supervisor-2023.01.1
agent_version 1.4.1
docker_version 20.10.23
disk_total 119.2 GB
disk_used 23.1 GB
healthy true
supported true
supervisor_api ok
version_api ok
installed_addons AdGuard Home (4.8.0), Bookstack (1.4.0), Caddy 2 (1.3.1), File editor (5.5.0), Grafana (8.1.0), Home Assistant Google Drive Backup (0.110.1), InfluxDB (4.5.0), Terminal & SSH (9.6.1), WireGuard (0.7.1), Zigbee2MQTT (1.29.2-1), Node-RED (14.0.1), ESPHome (2022.12.7), MariaDB (2.5.1), phpMyAdmin (0.8.3)
Dashboards
dashboards 1
resources 27
views 7
mode storage
NextDNS
can_reach_server ok
Recorder
oldest_recorder_run 20 gennaio 2023, 14:48
current_recorder_run 26 gennaio 2023, 18:22
estimated_db_size 109.53 MiB
database_engine mysql
database_version 10.6.8
Sonoff
version 3.3.1 (b20e33c)
cloud_online 0 / 6
local_online 4 / 4
Xiaomi Miot Auto
component_version 0.7.5
can_reach_server ok
can_reach_spec ok
logged_accounts 1
total_devices 2

@sysadmin-info
Copy link

sysadmin-info commented Jan 27, 2023

You did restart the systemd-resolved without changing the resolved.conf. There is the whole guide and is explained what and how to modify resolv.conf. Do this, then upgrade Adguard Home and perform a check, please. Now it shows me the 502 bad gateway. I diabled the systemd-resolved.service but it did not solve the problem.

@sysadmin-info
Copy link

sysadmin-info commented Jan 27, 2023

How to roll back?
Go to Settings -> System -> Backups
Click on the version of adguard home 4.7.6 , select small checkboxes that you want only rollback the addon adguard, there are only two checkboxes, so select both and then click restore. Then go to Settings -> Addons -> Adguard, stop the addon and start it.

@m-l
Copy link

m-l commented Jan 28, 2023

For me it is sometimes crashing like below, maybe it is a hint. I run HA Supervised on RPi4. Previous version of AdGuard worked perfectly... :/
As with others, the version 4.8 cannot bind DNS to network interfaces

2023/01/28 04:56:10.704793 [info] stopping AdGuard Home
2023/01/28 04:56:10.704813 [info] stopping http server...
2023/01/28 04:56:10.704872 [info] stopped http server
2023/01/28 04:56:10.710696 [info] dnsproxy: cache: enabled, size 4096 b
2023/01/28 04:56:10.710731 [info] MaxGoroutines is set to 300
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7dc0e0]
goroutine 1 [running]:
github.com/AdguardTeam/AdGuardHome/internal/home.(*Web).TLSConfigChanged(0x0, {0x1da2fd4, 0x382e058}, {0x0, {0x0, 0x0}, 0x0, 0x1bb, 0x355, 0x355, ...})
	github.com/AdguardTeam/AdGuardHome/internal/home/web.go:148 +0x40
github.com/AdguardTeam/AdGuardHome/internal/home.(*tlsManager).start(0x391d560)
	github.com/AdguardTeam/AdGuardHome/internal/home/tls.go:111 +0x84
github.com/AdguardTeam/AdGuardHome/internal/home.run({{0x0, 0x0}, {0xbee4ec3b, 0xd}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...)
	github.com/AdguardTeam/AdGuardHome/internal/home/home.go:532 +0x658
github.com/AdguardTeam/AdGuardHome/internal/home.Main({0x1d9efa0, 0x1da9f58})
	github.com/AdguardTeam/AdGuardHome/internal/home/home.go:145 +0x124
main.main()
	github.com/AdguardTeam/AdGuardHome/main.go:17 +0x28
[04:56:10] INFO: Service Adguard Home exited with code 2 (by signal 0)

With previos version all worked fine:

2023/01/28 05:01:52.231454 [info] Creating the UDP server socket
2023/01/28 05:01:52.231594 [info] Listening to udp://172.30.32.1:53
2023/01/28 05:01:52.231616 [info] Creating a TCP server socket
2023/01/28 05:01:52.231719 [info] Listening to tcp://192.168.254.20:53
2023/01/28 05:01:52.231739 [info] Creating a TCP server socket
2023/01/28 05:01:52.231816 [info] Listening to tcp://172.30.32.1:53
2023/01/28 05:01:52.232176 [info] Entering the tcp listener loop on 172.30.32.1:53
2023/01/28 05:01:52.232643 [info] Entering the UDP listener loop on 192.168.254.20:53
2023/01/28 05:01:52.233472 [info] Entering the UDP listener loop on 172.30.32.1:53
2023/01/28 05:01:52.233474 [info] Entering the tcp listener loop on 192.168.254.20:53

@uroh
Copy link

uroh commented Jan 28, 2023

what do you see with the "ip a" command?

@m-l
Copy link

m-l commented Jan 28, 2023

what do you see with the "ip a" command?

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:7b:58:fe brd ff:ff:ff:ff:ff:ff
    inet 192.168.254.20/24 brd 192.168.254.255 scope global dynamic noprefixroute eth0
       valid_lft 555sec preferred_lft 555sec
    inet6 fe80::306c:21f6:a58d:cc5f/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether dc:a6:32:7b:59:00 brd ff:ff:ff:ff:ff:ff
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:a1:9b:00:59 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
5: hassio: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:c7:67:ef:1b brd ff:ff:ff:ff:ff:ff
    inet 172.30.32.1/23 brd 172.30.33.255 scope global hassio
       valid_lft forever preferred_lft forever
55: veth05350d5@if54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether ce:af:3c:16:6c:c9 brd ff:ff:ff:ff:ff:ff link-netnsid 0
57: veth355327d@if56: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default
    link/ether f6:4d:29:ee:a6:3f brd ff:ff:ff:ff:ff:ff link-netnsid 1
59: vethed3d10d@if58: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether 0e:d4:09:93:fa:f7 brd ff:ff:ff:ff:ff:ff link-netnsid 1
61: vethf343779@if60: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether 6e:a9:5b:8d:c8:90 brd ff:ff:ff:ff:ff:ff link-netnsid 2
63: veth9503d50@if62: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether 7a:5d:cd:ca:96:6f brd ff:ff:ff:ff:ff:ff link-netnsid 3
65: vethea5d778@if64: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether 7e:79:d9:ba:d3:ba brd ff:ff:ff:ff:ff:ff link-netnsid 4
67: veth8c740ed@if66: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether 7a:76:0e:18:67:5d brd ff:ff:ff:ff:ff:ff link-netnsid 5
69: vethae1d5b7@if68: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether 4e:ad:57:c9:42:30 brd ff:ff:ff:ff:ff:ff link-netnsid 8
71: veth5add810@if70: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether e6:c8:88:24:46:ea brd ff:ff:ff:ff:ff:ff link-netnsid 6
73: veth872bb99@if72: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master hassio state UP group default
    link/ether 8a:6d:96:36:fb:dd brd ff:ff:ff:ff:ff:ff link-netnsid 7

@sysadmin-info
Copy link

I have HA installed as os on an intel laptop, the above suggestions don't work for me (the command where run in the home assistant terminal)

image

sorry, linux noob here :)

It is because you have a read only system. Probably there is a problem with a low voltage or too many devices connected via USB or GPIO issue like maybe you connected something wrongly through GPIO like I do not know a relay or mosfet and there is a problem with voltage. Anyway because of some reason system went into read only mode. This is a normal behavior of the Raspberry Pi I experienced in past when I was playing with mosfets and relays through GPIO.

@CosticaPuntaru
Copy link

its a laptop, not a pi :(

@sysadmin-info
Copy link

its a laptop, not a pi :(

I can recommend you to read this thread: https://askubuntu.com/questions/197459/how-to-fix-sudo-unable-to-open-read-only-file-system

I hope you will solve your problem.

@github-actions
Copy link

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!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Apr 13, 2023
@Nuetron06
Copy link

I just want to point out this is still an issue for at least a few people, myself included.
I have two instances of home assistant supervised (latest core and supervisor) running Debian 11, and Adguard has issues on both if I use the updated version.
If I change the port number (to 54 as an example) then I do see in the log it is able to successfully start listening on both 127.0.0.1 and ::1.
I've tried adding the following to my YAML to no avail (per this post):

dns:
  bind_hosts:
    - 0.0.0.0

I believe this was the start of the issue. It would be nice if we had the option to disable listening on localhost...

Failure (using port 53, default):

2023/04/13 11:46:12.546632 [info] Creating the UDP server socket
2023/04/13 11:46:12.546693 [info] Listening to udp://172.24.0.250:53
2023/04/13 11:46:12.546727 [info] Creating the UDP server socket
2023/04/13 11:46:12.547311 [info] Listening to udp://172.30.32.1:53
2023/04/13 11:46:12.547317 [info] Creating the UDP server socket
2023/04/13 11:46:12.554459 [fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp 127.0.0.1:53: bind: address already in use

Success (using port 54):

2023/04/13 11:58:33.634590 [info] Creating the UDP server socket
2023/04/13 11:58:33.634654 [info] Listening to udp://172.24.0.250:54
2023/04/13 11:58:33.634660 [info] Creating the UDP server socket
2023/04/13 11:58:33.634685 [info] Listening to udp://172.30.32.1:54
2023/04/13 11:58:33.634688 [info] Creating the UDP server socket
2023/04/13 11:58:33.634711 [info] Listening to udp://127.0.0.1:54
2023/04/13 11:58:33.634714 [info] Creating the UDP server socket
2023/04/13 11:58:33.634742 [info] Listening to udp://[::1]:54
2023/04/13 11:58:33.634745 [info] Creating a TCP server socket
2023/04/13 11:58:33.634773 [info] Listening to tcp://172.24.0.250:54
2023/04/13 11:58:33.634776 [info] Creating a TCP server socket
2023/04/13 11:58:33.634794 [info] Listening to tcp://172.30.32.1:54
2023/04/13 11:58:33.634796 [info] Creating a TCP server socket
2023/04/13 11:58:33.634814 [info] Listening to tcp://127.0.0.1:54
2023/04/13 11:58:33.634816 [info] Creating a TCP server socket
2023/04/13 11:58:33.634836 [info] Listening to tcp://[::1]:54
2023/04/13 11:58:33.634897 [info] Entering the UDP listener loop on 172.30.32.1:54
2023/04/13 11:58:33.634907 [info] Entering the UDP listener loop on [::1]:54
2023/04/13 11:58:33.635004 [info] Entering the UDP listener loop on 127.0.0.1:54
2023/04/13 11:58:33.635004 [info] Entering the UDP listener loop on 172.24.0.250:54
2023/04/13 11:58:33.635017 [info] Entering the tcp listener loop on 172.24.0.250:54
2023/04/13 11:58:33.635034 [info] Entering the tcp listener loop on 172.30.32.1:54
2023/04/13 11:58:33.635045 [info] Entering the tcp listener loop on 127.0.0.1:54
2023/04/13 11:58:33.635004 [info] Entering the tcp listener loop on [::1]:54
[11:58:33] INFO: Starting NGinx...
[11:58:34] INFO: Successfully send discovery information to Home Assistant.

I also see in the generated config file where it is setting these interfaces (and I'd change it there, if it didn't get overwritten on every restart of the addon):
/usr/share/hassio/addons/data/a0d7b954_adguard/adguard/AdGuardHome.yaml

@Nuetron06
Copy link

I have a feeling if I disable resolvd then it will succeed. But if I do, then HomeAssistant will report my system is out of compliance.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Apr 14, 2023
@github-actions
Copy link

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!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label May 15, 2023
@reddog-42
Copy link

Same, similar problem with latest versions of adguard and HA OS.
It was working until I loaded latest OS.
Tried fixing with latest Adguard, but no success.
Disabled and reenabled IPV6 to get ::1 active similar to above, but still unable to listed on ip4 addr.

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.6
You are running the latest version of this add-on.
System: Home Assistant OS 10.1 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2023.5.3
Home Assistant Supervisor: 2023.04.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:41:24] INFO: Starting AdGuard Home server...
2023/05/16 13:41:24.594626 [info] AdGuard Home, version v0.107.29
2023/05/16 13:41:24.595053 [info] AdGuard Home updates are disabled
2023/05/16 13:41:24.607520 [info] tls: using default ciphers
2023/05/16 13:41:24.629356 [info] safesearch default: reset 253 rules
2023/05/16 13:41:24.650390 [info] Initializing auth module: /data/adguard/data/sessions.db
2023/05/16 13:41:24.656320 [info] auth: initialized. users:0 sessions:0
2023/05/16 13:41:24.656387 [info] web: initializing
2023/05/16 13:41:24.992238 [info] dnsproxy: cache: enabled, size 4096 b
2023/05/16 13:41:24.992286 [info] MaxGoroutines is set to 300
2023/05/16 13:41:24.992576 [info] AdGuard Home is available at the following addresses:
2023/05/16 13:41:24.992613 [info] go to http://127.0.0.1:45158
[13:41:25] INFO: Starting NGinx...
[13:41:25] 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/05/16 13:41:27.320098 [info] Starting the DNS proxy server
2023/05/16 13:41:27.320321 [info] Ratelimit is enabled and set to 20 rps
2023/05/16 13:41:27.320471 [info] The server is configured to refuse ANY requests
2023/05/16 13:41:27.320619 [info] dnsproxy: cache: enabled, size 4194304 b
2023/05/16 13:41:27.320772 [info] MaxGoroutines is set to 300
2023/05/16 13:41:27.320930 [info] Creating the UDP server socket
2023/05/16 13:41:27.321274 [info] Listening to udp://10.0.0.38:53
2023/05/16 13:41:27.321437 [info] Creating the UDP server socket
2023/05/16 13:41:27.321788 [info] Listening to udp://[fd51:2d59:96c1:1::d4b]:53
2023/05/16 13:41:27.321986 [info] Creating the UDP server socket
2023/05/16 13:41:27.322562 [info] Listening to udp://[2403:xxxx:8d93:1::d4b]:53
2023/05/16 13:41:27.322861 [info] Creating the UDP server socket
2023/05/16 13:41:27.323467 [info] Listening to udp://[2403:xxxx:8d93:1:7a69:3598:f731:fe5c]:53
2023/05/16 13:41:27.323770 [info] Creating the UDP server socket
2023/05/16 13:41:27.324242 [info] Listening to udp://[fd51:2d59:96c1:1:3ed1:1684:ec17:e237]:53
2023/05/16 13:41:27.324544 [info] Creating the UDP server socket
2023/05/16 13:41:27.329225 [fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp 10.0.0.38:53: bind: address already in use
[13:41:27] INFO: Service Adguard Home exited with code 1 (by signal 0)

@sysadmin-info
Copy link

sysadmin-info commented May 16, 2023 via email

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label May 16, 2023
@reddog-42
Copy link

sudo : ss : command not found - using Advanced SSH & Web Terminal Addon

@sysadmin-info
Copy link

sysadmin-info commented May 16, 2023 via email

@reddog-42
Copy link

running Home Assistant OS on RPi 4

~ $ cat /etc/os-release
Name="Alpine Linux"
ID=alpine
VERSION_ID=3.17.3
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://github.alpinelinux.org/alpine/aports/-/issues"
~ sudo netstat -tulpn | grep " 53" ( no output )
nothing on port 53

~ sudo netstat -tulpn | grep "udp"
udp 0 0 0.0.0.0:46277 0.0.0.0:* -
udp 0 0 10.0.0.38:5353 0.0.0.0:* -
udp 0 0 172.30.32.1:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:1900 0.0.0.0:* -
udp 0 0 0.0.0.0:1900 0.0.0.0:* -
udp 0 0 10.0.0.255:137 0.0.0.0:* -
udp 0 0 10.0.0.38:137 0.0.0.0:* -
udp 0 0 0.0.0.0:137 0.0.0.0:* -
udp 0 0 10.0.0.255:138 0.0.0.0:* -
udp 0 0 10.0.0.38:138 0.0.0.0:* -
udp 0 0 0.0.0.0:138 0.0.0.0:* -
udp 0 0 0.0.0.0:37154 0.0.0.0:* -
udp 0 0 0.0.0.0:45390 0.0.0.0:* -
udp6 0 0 :::50251 :::* -
udp6 0 0 :::5353 :::* -
udp6 0 0 :::5353 :::* -
udp6 0 0 fd51:2d59:96c1:1:::5353 :::* -
udp6 0 0 fd51:2d59:96c1:1:::5353 :::* -
udp6 0 0 :::5355 :::* -
udp6 0 0 :::36244 :::* -
udp6 0 0 :::1900 :::* -
udp6 0 0 :::1900 :::* -
udp6 0 0 :::1900 :::* -
udp6 0 0 fe80::61a4:5e11:139:546 :::* -
udp6 0 0 fe80::f268:cc28:828:546 :::* -
~

@sysadmin-info
Copy link

sysadmin-info commented May 16, 2023 via email

@reddog-42
Copy link

Sorry,
As above, grep " 53" gave no output. There isn't anything active on port 53.

@reddog-42
Copy link

Solved. Thanks for your help.
My router was giving the same ipv4 address (dhcp) to the wlan0 interface as the static eth0 interface, so seems adguard was trying to listen twice on the same address.
I updated wlan0 to a different static address and adguard now starts happily.
Not sure why it has been working for the last year or so.

@sysadmin-info
Copy link

sysadmin-info commented May 17, 2023 via email

@sysadmin-info
Copy link

sysadmin-info commented May 17, 2023 via email

@github-actions
Copy link

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!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jun 16, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
@azagramac
Copy link

azagramac commented Jun 29, 2023

😢

user@NanoPi:~# docker logs adguard -f
2023/06/29 19:15:37.899325 [info] AdGuard Home, version v0.108.0-a.586+2069eddf
2023/06/29 19:15:37.899743 [info] AdGuard Home updates are disabled
2023/06/29 19:15:37.918536 [info] tls: using default ciphers
2023/06/29 19:15:37.932912 [info] safesearch default: reset 194 rules
2023/06/29 19:15:38.069059 [info] Initializing auth module: /opt/adguardhome/work/data/sessions.db
2023/06/29 19:15:38.069708 [info] auth: initialized.  users:1  sessions:5
2023/06/29 19:15:38.070767 [info] tls: number of certs: 3
2023/06/29 19:15:38.070905 [info] tls: got an intermediate cert
2023/06/29 19:15:38.070963 [info] tls: got an intermediate cert
2023/06/29 19:15:38.195787 [info] web: initializing
2023/06/29 19:15:38.759103 [info] dnsproxy: cache: enabled, size 4096 b
2023/06/29 19:15:38.759170 [info] dnsproxy: max goroutines is set to 300
2023/06/29 19:15:38.760965 [info] AdGuard Home is available at the following addresses:
2023/06/29 19:15:38.761555 [info] go to https://MY_DOMAIN:443
2023/06/29 19:15:38.762074 [info] go to http://127.0.0.1:80
2023/06/29 19:15:38.762202 [info] go to http://172.20.0.2:80
2023/06/29 19:15:47.577103 [info] dnsproxy: starting dns proxy server
2023/06/29 19:15:47.577308 [info] Ratelimit is enabled and set to 20 rps
2023/06/29 19:15:47.577335 [info] The server is configured to refuse ANY requests
2023/06/29 19:15:47.577352 [info] dnsproxy: cache: enabled, size 16777216 b
2023/06/29 19:15:47.577384 [info] dnsproxy: max goroutines is set to 300
2023/06/29 19:15:47.577463 [info] dnsproxy: creating udp server socket XXX.XXX.XXX.XXX:53
2023/06/29 19:15:47.676151 [fatal] couldn't start forwarding DNS server: starting listeners: listening on udp addr XXX.XXX.XXX.XXX:53: listening to udp socket: listen udp XXX.XXX.XXX.XXX:53: bind: cannot assign requested address
user@NanoPi:~# netstat -tulpn | grep ":53 " 
user@NanoPi:~#
user@NanoPi:~# cat /etc/sysctl.conf
net.ipv6.conf.lo.disable_ipv6 = 0

Link docker-compose.yaml

@surak
Copy link

surak commented Jul 4, 2023

I still face exactly the same issue - why close it?

@surak surak mentioned this issue Jul 4, 2023
@mareklab
Copy link

mareklab commented Jul 7, 2023

I still face exactly the same issue - why close it?

The solution is to re-enable IPv6 support on the box.

@grigio
Copy link

grigio commented Jul 22, 2023

i had ipv6 enabled and i still have this issue

@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests