HA losses DNS resolution randomly until reboot

After the last update I have the problem that HA kind of loses DNS resolutions. For example my frigate server lives at frigate.my.domain and while I can ping it in my PC, if I connect to ha terminal and do that it fails until I do an ha dns restart.

It just fails at random times, I have an automation that tells me when my cameras are down and that is how it broke.

Does other one had this problem? Is there something that I can do to prevent this?

Thanks!

2 Likes

Can I just put a vote up for… I thought random mDNS wierdness was just a thing In HA? :rofl:

1 Like

If you look up mDNS in the dictionary I think one of the definitions is

Randomly works what you least expect it

Running adguard or pihole or another DNS blocker is what messes peoples DNS most of the time. It’s blamed on HA because they have it running in an add-on.

1 Like

lower the TTL on your domain records to 5 minutes orso. Local cache will mess your system up if its 60 minutes or even 24h

(and whats said here, do DNS locally the right way or dont do it at all)

2 Likes

I have an LXC container running AdguardHome home for years now, I never had a problem until now.

I will check how long s the cache in my adguard home instance. But I have it running for years and want a problem until now.

mDNS have nothing to do with DNS servers.
mDNS is a serverless protocol.

So the problem is DNS correct? I will update the post

No, mDNS is not DNS.
mDNS is a serverless protocol that are run besides DNS.
DNS is not allowed to use .local domains, because that is reserved for mDNS.

I think HA might have a mDNS browser somewhere, either built in or as an integration.
Search for that and use that for troubleshooting further.

Also seeing this happening to my instance, which should be hassio.local:port.

On a regular base this now breaks, (though nt related to anything I seems to do, or my system) and I have to connect to the ip_address:local

I’ve checked my router but nothing obvious stands out

Also, Network settings in HA dont have a lead on this, what to check or not.

Somehow this only happens ā€˜returning’ to the browser after some time.

which made me feel it has to do with this Profile setting

but that would be odd, as I have had it like that for longer time, and, I can see what it does when it wont connect and I can simply reload the view.

not when it lost hassio.local however, in which case no reload is possible

btw ha dns restart doesnt help either…

as a matter of fact, it wont connect at all anymore, only via ip-address…

update

as it turns out it was a setting in my Unify DM. Mdns settings apparently were unset, and I noticed a localdomain instead of local

had to give it a few saves and reloads in HA, and then it started working again.

The problem I am having is the other way around, HA does not see any other my.local.domain

your statement is a bit ambiguous.

Can HA not lookup hosts like www.google.com or homeassistant.local??

.local is controlled by mDNS and other domains like google.com is controlled by DNS.

tbh, I thought I had it fixed, but still see those disconnects on the hassio.local, requiring me to get back to the ip-addres:port regularly

really a nasty thing, considering my bookmarks were made on the dns .local name ;-//

If you run a DNS server, then switch to using a domain name other than .local

my.domain are resolved locally with adguard external LXC container running in proxmox with boot priority 1, my HA VM also runs on the same proxmox node and always after adguard starts.

I never had this problem before. Until now it happened 3 times at random moments.

That said, since my last post haven’t happened again.

Usually it is the adguard/pihole that does something wrong, so see what the logs on that says.

I haven’t seen anything there, and all my other devices could resolve the frigate domain normally.

But I will check when it happens again.

DNS has been randomly failing on my hass container recently as well.

ERROR (MainThread) [homeassistant.components.homeassistant_alerts.coordinator] Error requesting homeassistant_alerts data: Cannot connect to host alerts.home-assistant.io:443 ssl:default [Could not contact DNS servers]

nslookup whatever.com
;; communications error to ::1#53: connection refused

;; communications error to ::1#53: connection refused

;; communications error to ::1#53: connection refused

;; communications error to 127.0.0.1#53: connection refused

;; no servers could be reached
1 Like