home-assistant / plugin-dns

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

Dns stops resolving within hours #51

Closed idfxken closed 2 years ago

idfxken commented 3 years ago

Ha is configured with a local dns resolver, while all other means of resolving are blocked on our home automation subnet.

When (re)started, HA dns runs perfectly fine, and can resolve all queries through the assigned server.

ha dns info
host: 172.30.32.3
locals:
- dns://192.168.111.1
servers:
- dns://192.168.111.1
update_available: false
version: 2021.06.0
version_latest: 2021.06.0
~ $ ping google.be
PING google.be (142.251.36.35): 56 data bytes

After a few hours, the resolver just stops resolving through the programmed server. and switches to dot 1.0.0.1/1.1.1.1:853 for all dns requests, which are all refused by the router ofcourse. Somehow HA jforgot, that 192.168.1111.1 is its assigned dns server.

Edit: logs from the second the issue starts:

[ERROR] plugin/errors: 2 . NS: tls: DialWithDialer timed out [INFO] 127.0.0.1:44137 - 6201 "NS IN . udp 40 true 2048" NOERROR - 0 1.001374795s [ERROR] plugin/errors: 2 . NS: tls: DialWithDialer timed out [INFO] 172.30.33.3:50563 - 6201 "NS IN . udp 40 false 4096" SERVFAIL qr,rd 17 6.071750661s [INFO] 127.0.0.1:45411 - 6201 "NS IN . udp 40 true 2048" NOERROR - 0 1.00095742s [ERROR] plugin/errors: 2 . NS: tls: DialWithDialer timed out [INFO] 127.0.0.1:44137 - 6201 "NS IN . udp 40 true 2048" NOERROR - 0 1.000966169s [ERROR] plugin/errors: 2 . NS: tls: DialWithDialer timed out [INFO] 172.30.33.3:52280 - 6201 "NS IN . udp 40 false 4096" SERVFAIL qr,rd 17 6.008133092s [INFO] 127.0.0.1:47155 - 3762 "A IN version.home-assistant.io. udp 54 true 2048" NOERROR - 0 1.004052137s [ERROR] plugin/errors: 2 version.home-assistant.io. A: tls: DialWithDialer timed out [INFO] 127.0.0.1:44272 - 3762 "A IN version.home-assistant.io. udp 54 true 2048" NOERROR - 0 1.000851399s [ERROR] plugin/errors: 2 version.home-assistant.io. A: tls: DialWithDialer timed out [INFO] 172.30.32.2:57753 - 3762 "A IN version.home-assistant.io. udp 43 false 512" SERVFAIL qr,rd 43 2.013838761s [INFO] 127.0.0.1:44704 - 15932 "A IN data.buienradar.nl. udp 47 true 2048" NOERROR - 0 1.001158626s [ERROR] plugin/errors: 2 data.buienradar.nl. A: tls: DialWithDialer timed out [INFO] 127.0.0.1:33818 - 16449 "AAAA IN data.buienradar.nl. udp 47 true 2048" NOERROR - 0 1.003631786s [ERROR] plugin/errors: 2 data.buienradar.nl. AAAA: tls: DialWithDialer timed out [INFO] 127.0.0.1:60988 - 15932 "A IN data.buienradar.nl. udp 47 true 2048" NOERROR - 0 1.000984262s [ERROR] plugin/errors: 2 data.buienradar.nl. A: tls: DialWithDialer timed out [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,rd 36 2.005486429s [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.00011969s [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000257307s [INFO] 127.0.0.1:33982 - 16449 "AAAA IN data.buienradar.nl. udp 47 true 2048" NOERROR - 0 1.001272358s [ERROR] plugin/errors: 2 data.buienradar.nl. AAAA: tls: DialWithDialer timed out [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000378729s [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000304851s [INFO] 172.30.32.1:45411 - 16449 "AAAA IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,rd 36 2.010680479s [INFO] 172.30.32.1:45411 - 16449 "AAAA IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000205219s [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000374101s [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000223414s [INFO] 172.30.32.1:45411 - 16449 "AAAA IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000147082s [INFO] 172.30.32.1:45411 - 16449 "AAAA IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.000172155s [INFO] 172.30.32.1:45411 - 15932 "A IN data.buienradar.nl. udp 36 false 512" SERVFAIL qr,aa,rd 36 0.001195803s [INFO] 127.0.0.1:56238 - 58622 "A IN een.be. udp 35 true 2048" NOERROR - 0 1.001122865s [ERROR] plugin/errors: 2 een.be. A: tls: DialWithDialer timed out

Zixim commented 3 years ago

This problem bas been around for at least 1 year, devs can't/won't fix.

As a work-around, I’m using an edited /usr/share/tempio/corefile. This is on Home Assistant OS, so that file is located inside the hassio_dns docker container. Of course this meant i need to re-apply the edit after every update to HAOS, beats having to do ha dns restart every few hours.

idfxken commented 3 years ago

was running a script every hour, to restart the container. but this way seems cleaner for now :) ty. Hope that they one day fix it, I'll leave it open, as it rly is a dirty bug

Strohhutpat commented 2 years ago

in 2021.11 bug is still present

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mundschenk-at commented 2 years ago

Still present in 2021.12.7.

Strohhutpat commented 2 years ago

this works for me https://github.com/home-assistant/plugin-dns/issues/64#issuecomment-963986104

Strohhutpat commented 2 years ago

still present, the workaround doesnt help for long uptime

mdegat01 commented 2 years ago

Fixed by #82

mdegat01 commented 2 years ago

Also note that there is a new option to disable the fallback dns added here: https://github.com/home-assistant/supervisor/pull/3586 as I would guess a number of users on here would be interested in that.