hassio-addons / addon-adguard-home

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

Adguard freezes #367

Closed jussipu closed 1 year ago

jussipu commented 1 year ago

It's been doing that few weeks already. I have no idea how to debug this. The last line in the log is always that 'language is set to en' It does not respond dns queries and can't load gui. A restart will help until it freezes again

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: AdGuard Home
 Network-wide ads & trackers blocking DNS server
-----------------------------------------------------------
 Add-on version: 4.7.5
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.3  (aarch64 / odroid-n2)
 Home Assistant Core: 2022.11.4
 Home Assistant Supervisor: 2022.11.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/adguard.sh
cont-init: info: /etc/cont-init.d/adguard.sh exited 0
cont-init: info: running /etc/cont-init.d/discovery.sh
[09:28:26] INFO: Successfully send discovery information to Home Assistant.
cont-init: info: /etc/cont-init.d/discovery.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun adguard (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[09:28:27] INFO: Starting AdGuard Home server...
2022/11/25 09:28:27.465420 [info] AdGuard Home, version v0.107.17
2022/11/25 09:28:27.465523 [info] AdGuard Home updates are disabled
2022/11/25 09:28:27.469880 [info] tls: using default ciphers
2022/11/25 09:28:27.471523 [error] creating dhcpv4 srv: dhcpv4: invalid IP is not an IPv4 address
2022/11/25 09:28:27.477104 [info] Initializing auth module: /data/adguard/data/sessions.db
2022/11/25 09:28:27.477304 [info] auth: initialized.  users:0  sessions:0
2022/11/25 09:28:27.477330 [info] web: initializing
2022/11/25 09:28:27.717275 [info] DNS cache is enabled
2022/11/25 09:28:27.717305 [info] MaxGoroutines is set to 300
2022/11/25 09:28:27.717443 [info] AdGuard Home is available at the following addresses:
2022/11/25 09:28:27.717465 [info] Go to http://127.0.0.1:45158
[09:28:27] INFO: Starting NGinx...
2022/11/25 09:28:31.586378 [info] Starting the DNS proxy server
2022/11/25 09:28:31.586414 [info] The server is configured to refuse ANY requests
2022/11/25 09:28:31.586421 [info] DNS cache is enabled
2022/11/25 09:28:31.586437 [info] MaxGoroutines is set to 300
2022/11/25 09:28:31.586459 [info] Creating the UDP server socket
2022/11/25 09:28:31.586602 [info] Listening to udp://192.168.1.5:53
2022/11/25 09:28:31.586610 [info] Creating the UDP server socket
2022/11/25 09:28:31.586651 [info] Listening to udp://172.30.32.1:53
2022/11/25 09:28:31.586661 [info] Creating a TCP server socket
2022/11/25 09:28:31.586712 [info] Listening to tcp://192.168.1.5:53
2022/11/25 09:28:31.586719 [info] Creating a TCP server socket
2022/11/25 09:28:31.586747 [info] Listening to tcp://172.30.32.1:53
2022/11/25 09:28:31.586886 [info] Entering the UDP listener loop on 172.30.32.1:53
2022/11/25 09:28:31.586916 [info] Entering the UDP listener loop on 192.168.1.5:53
2022/11/25 09:28:31.587046 [info] Entering the tcp listener loop on 192.168.1.5:53
2022/11/25 09:28:31.587046 [info] Entering the tcp listener loop on 172.30.32.1:53
2022/11/25 15:14:47.441582 [info] home: language is set to en
caraar12345 commented 1 year ago

I'm not getting the language set to en line, but I am also getting it freezing every so often. It's done it twice today already πŸ˜…

JamieP83 commented 1 year ago

same problem here, since the last adguard update dashboard wont load any devices using adguard DNS dont load any webpages

Home Assistant 2022.11.5 Supervisor 2022.11.2 Operating System 9.3 Frontend 20221108.0 - latest

Logger: homeassistant.components.hassio.handler Source: components/hassio/handler.py:42 Integration: Home Assistant Supervisor (documentation, issues) First occurred: 30 November 2022 at 2:52:20 pm (7 occurrences) Last logged: 3:00:53 am

Timeout on /addons/a0d7b954_nodered/stats request Timeout on /addons/core_ssh/stats request Timeout on /addons/a0d7b954_logviewer/stats request Timeout on /addons/core_samba/stats request Timeout on /addons/a0d7b954_adguard/stats request

ogajduse commented 1 year ago

I am running 4.7.5 version of the addon and I experience freezes even multiple times during a single day. From the following graph it is evident that the whole AdGuard service stopped responding even to HA's queries. image

I enabled verbose logging and captured the following log: https://gist.github.com/ogajduse/68ebb976cbfe89879d5e9a5ceaee52e7

Last successfull query was the one asking for p69-fmfmobile.icloud.com and then AdGuard stopped responding to queries. Can anyone see something strange in the log?

Note: the graph and the log capture AdGuard crashes but in a different moment.

Home Assistant 2022.11.2
Supervisor 2022.11.2
Operating System 9.3
Frontend 20221108.0 - latest
grischard commented 1 year ago

This is now happening every few hours for me.

The symptoms are that dns stops responding on port 53, and that the web interface stops responding. Inside the docker container, the AdGuardHome process is still running. I think that the dhcp requests still work. List updates are still happening according to the logs.

grischard commented 1 year ago

OK, I think I've been able to stabilise it somewhat. No freezes since I've reset the adguard dhcp leases, query log and stats databases. Unfortunately, the button to do this from the web interface gives me an error (#359), and I had to do it manually.

Connect to the machine running HA OS over ssh, and enter the adguard docker container:

docker exec -it addon_a0d7b954_adguard /bin/bash

delete the databases

cd /data/adguard/data
rm  querylog.json  sessions.db querylog.json.1 ../leases.db
exit

Restart the add-on, and hopefully it'll be stable.

runshotgun commented 1 year ago

Same issue here, hoping for a fix!

caraar12345 commented 1 year ago

I'd like to argue the reasoning in #378 for not testing DNS resolution. In this instance, it's not that you get a SERVFAIL etc as you would if there's no upstream. There is simply no DNS response.

da-anda commented 1 year ago

out of the blue, I seem to experience the same issue since yesterday and it happens several times a day. I now also cleared the log and stats in the hope that it fixes things for now (UI was still responding, except for the dashboard, but every other page from the menu I clicked seemed to work). But I had the same log settings for over a year while retention is 7 days for logs and 30 days for stats, so the log size shouldn't have been the issue or it should have shown up earlier. Nothing else changed, except for HA and add-on updates ofc. There were also no errors in the log.

kvanbiesen commented 1 year ago

For me; I have the same problem.andin the host logs it's shows a 100 times mount decatived for the Adguard container

Jan 22 14:00:40 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-157365b08ea583ce48086a592ac2e18687b472d055f797b7d157b3a4af2bd98e-runc.q0yLS1.mount: Deactivated successfully. Jan 22 14:01:10 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-157365b08ea583ce48086a592ac2e18687b472d055f797b7d157b3a4af2bd98e-runc.0C1KRN.mount: Deactivated successfully. Jan 22 14:01:40 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-157365b08ea583ce48086a592ac2e18687b472d055f797b7d157b3a4af2bd98e-runc.bFDeSj.mount: Deactivated successfully. Jan 22 14:02:10 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-157365b08ea583ce48086a592ac2e18687b472d055f797b7d157b3a4af2bd98e-runc.qxaK0s.mount: Deactivated successfully. Jan 22 14:02:41 homeassistant systemd[1]: run-docker-runtime\x2drunc-moby-157365b08ea583ce48086a592ac2e18687b472d055f797b7d157b3a4af2bd98e-runc.nw1V9Z.mount: Deactivated successfully. ...

These all refer to the Adguard container

https://community.home-assistant.io/t/log-host-full-of-homeassistant-systemd-1-run-docker-runtime-x2drunc-moby-xxx-xxx-mount-deactivated-successfully/523146

github-actions[bot] commented 1 year 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!

jherby2k commented 1 year ago

hasn't happened to me in a couple weeks, but man is it catastrophic when it does. Wish adguard supported clustering :(

KruseLuds commented 1 year ago

Mine seems better as well - moving in the right direction - when it is down then I'm totally screwed until I turn it off of course - and that is not shown in the graph but does happen every so often -

image

FYI

System Information

version core-2023.3.4
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.10
os_name Linux
os_version 5.10.0-21-arm64
arch aarch64
timezone America/New_York
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4999 Installed Version | 1.31.0 Stage | running Available Repositories | 1316 Downloaded Repositories | 22
AccuWeather can_reach_server | ok -- | -- remaining_requests | 27
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.03.1 agent_version | 1.4.1 docker_version | 23.0.1 disk_total | 915.4 GB disk_used | 14.2 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.8.3)
Dashboards dashboards | 5 -- | -- resources | 15 views | 29 mode | storage
Recorder oldest_recorder_run | February 13, 2023 at 6:46 PM -- | -- current_recorder_run | March 14, 2023 at 4:15 PM estimated_db_size | 1882.71 MiB database_engine | sqlite database_version | 3.38.5
github-actions[bot] commented 1 year 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!