home-assistant / plugin-dns

CoreDNS implementation for Home Assistant
Apache License 2.0
20 stars 14 forks source link

HassioDNS (2022.04.1) refuses to start after Core Update (2023.03.1) #104

Closed v1-valux closed 1 year ago

v1-valux commented 1 year ago

Hey there,

my hassio_dns container suddenly refuses to start after I updated to HA core 2023.3.1 and rebooted yesterday. HA doesn't start anymore as a consequence because it cannot resolve recorder- and mqtt-hostnames while starting.

In the hassio_dns logs I found this ...

runtime: frame github.com/miekg/dns.(*Server).readUDP untyped args 0x40002e9d18+0x48
fatal error: missing stackmap
runtime: frame github.com/miekg/dns.(*Server).serveTCP untyped locals 0x400009bdd0+0xb8
fatal error: missing stackmap
.:53
.:5553
CoreDNS-1.8.4
linux/arm64, go1.15.15, 053c4d5-dirty
runtime: frame github.com/miekg/dns.(*Server).serveTCP untyped locals 0x40002eddd0+0xb8
fatal error: missing stackmap

.... followed by hundrets of lines like this and suddenly a TERM signal:

runtime stack:
runtime.throw(0x8c05e7, 0x10)
    /usr/local/go/src/runtime/panic.go:1116 +0x54
runtime.getStackMap(0x400005bc00, 0x400005bd10, 0x400005bc01, 0x1afa70, 0x0, 0x5, 0x400005b928, 0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/stack.go:1255 +0x650
runtime.adjustframe(0x400005bc00, 0x400005bcf8, 0xe51de0)
    /usr/local/go/src/runtime/stack.go:642 +0x64
runtime.gentraceback(0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0x4000083080, 0x0, 0x0, 0x7fffffff, 0x8f5208, 0x400005bcf8, 0x0, ...)
    /usr/local/go/src/runtime/traceback.go:334 +0xd44
runtime.copystack(0x4000083080, 0x1000)
    /usr/local/go/src/runtime/stack.go:910 +0x1ec
runtime.newstack()
    /usr/local/go/src/runtime/stack.go:1076 +0x204
runtime.morestack()
    /usr/local/go/src/runtime/asm_arm64.s:308 +0x70
runtime stack:
runtime.throw(0x8c05e7, 0x10)
    /usr/local/go/src/runtime/panic.go:1116 +0x54
runtime.getStackMap(0x400033bc00, 0x400033bd10, 0x400033bc01, 0x1afa70, 0x0, 0x5, 0x400033b928, 0x0, 0x0, 0x0)
    /usr/local/go/src/runtime/stack.go:1255 +0x650
runtime.adjustframe(0x400033bc00, 0x400033bcf8, 0xe51de0)
    /usr/local/go/src/runtime/stack.go:642 +0x64
runtime.gentraceback(0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0x4000083380, 0x0, 0x0, 0x7fffffff, 0x8f5208, 0x400033bcf8, 0x0, ...)
    /usr/local/go/src/runtime/traceback.go:334 +0xd44
runtime.copystack(0x4000083380, 0x1000)
    /usr/local/go/src/runtime/stack.go:910 +0x1ec
runtime.newstack()
    /usr/local/go/src/runtime/stack.go:1076 +0x204
runtime.morestack()
    /usr/local/go/src/runtime/asm_arm64.s:308 +0x70
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

I'm not even sure if this is related to the core version because it was stopped some time before the update and I needed to manually start the container to have HA working again.

but now it would suddenly refuse to startup until the rate limit exceeds.

Supervisor-Logs:

WARNING (MainThread) [supervisor.plugins.base] Watchdog found dns plugin stopped, restarting...
INFO (MainThread) [supervisor.plugins.dns] Starting CoreDNS plugin
INFO (SyncWorker_4) [supervisor.docker.interface] Cleaning hassio_dns application
INFO (SyncWorker_4) [supervisor.docker.dns] Starting DNS ghcr.io/home-assistant/aarch64-hassio-dns with version 2022.04.1 - 172.30.32.3
ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-18504' coro=<PluginDns.watchdog_container() done, defined at /usr/src/supervisor/supervisor/plugins/dns.py:264> exception=CoreDNSJobError('Rate limit exceeded, more then 10 calls in 0:30:00')>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/plugins/dns.py", line 269, in watchdog_container
    return await super().watchdog_container(event)
  File "/usr/src/supervisor/supervisor/plugins/base.py", line 113, in watchdog_container
    await self._restart_after_problem(event.state)
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 144, in wrapper
    raise on_condition(
supervisor.exceptions.CoreDNSJobError: Rate limit exceeded, more then 10 calls in 0:30:00

$ ha dns info:

fallback: true
host: 172.30.32.3
llmnr: true
locals
- dns://10.1.0.253
mdns: true
servers:
- dns://10.1.0.253
update_available: false
version: 2022.04.1
version latest: 2022.04.1

PiHole as my DNS Server is up and healthy. I'm running HA Supervised on Debian arm64 (Pi OS) on a RaspberryPi 4 with apparmor.

I tried to make a backup before trying to reinstall. But backups are not possible, because HA is still in 'startup' and would never fully finish without dns.

Is there something I'm missing to adjust for future use of the Supervised Installation? What else can I do to find out whats wrong?

Many thanks in advance!

v1-valux commented 1 year ago

I solved it by cleaning up and reinstalling homeassistant-supervised.deb:

hassio_dns was now working again. Hopefully not happening again. :)

o/ cheers