home-assistant / plugin-dns

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

Core DNS not passing on mdns traffic since OS 11.5 update... #128

Open BluThunder2k opened 5 months ago

BluThunder2k commented 5 months ago

I'm not sure if this is the best place to post this, so apologies in advance if this needs moved.

My system Core 2024.2.1 Supervisor 2024.01.1 OS 11.5 recently updated.

After the update, core dns no longer resolves mdns entries on my network. Other PC's on the network can, but the virtual hass system cannot. It will resolve the items in /config/hosts and if I add my .local hostnames there they resolve as well (and ESPhome then shows everythign online as well).

It seems that either core dns is not passing the mdns requests on to multicast or multicast is not receiving it, so i'm posting here first, not sure.

Any suggestions? I've looked at /etc/corefile in the hassio_dns container and it appears normal:

.:53 {
    log {
        class error
    }
    errors
    loop

    hosts /config/hosts {
        fallthrough
    }
    template ANY AAAA local.hass.io hassio {
        rcode NOERROR
    }
    template ANY A local.hass.io hassio {
        rcode NXDOMAIN
    }
    mdns
    forward .  dns://192.168.0.65 dns://192.168.0.66 {
        except local.hass.io
        policy sequential
        health_check 1m
        max_fails 5
    }
    fallback REFUSED,SERVFAIL,NXDOMAIN . dns://127.0.0.1:5553
    cache 600
}

.:5553 {
    log {
        class error
    }
    errors

    forward . tls://1.1.1.1 tls://1.0.0.1 {
        tls_servername cloudflare-dns.com
        max_fails 0
        except local.hass.io
    }
    cache 600
}

Thanks!

t0k4rt commented 5 months ago

+1 Same problem here. Everything was working fine until some local homassistant failed to connect to .local domains.

Not sure but I think it stopped resolving mdns on ipv4.

On homeassistant container I can do:

homeassistant:/config# ping MacBook-Pro-4.local
PING MacBook-Pro-4.local (xxxx:xxxx:3583:c00::726): 56 data bytes
64 bytes from xxxx:xxxx:3583:c00::726: seq=0 ttl=64 time=1.708 ms

It answers with a ping on my ipv6

but if I force an ipv4 ping it fails:

homeassistant:/config# ping MacBook-Pro-4.local -4
ping: bad address 'MacBook-Pro-4.local'

There is also this systemd-resolved message on my linux systelm where home assistant supervised is installed:

févr. 27 14:13:22 radxa-e25 systemd-resolved[5968]: mDNS-IPv4: There appears to be another mDNS responder running, or previously systemd-resolved crashed with some outstanding transfers.
févr. 27 14:13:22 radxa-e25 systemd-resolved[5968]: mDNS-IPv6: There appears to be another mDNS responder running, or previously systemd-resolved crashed with some outstanding transfers.
agners commented 4 months ago

@BluThunder2k what is your main test environment here? SSH/Web Terminal/ESPhome? Those support IPv4 only, if so, then this would align with what @t0k4rt observes.

@t0k4rt did that issue also only appeared with a recent HAOS update?

I wonder if this is related with https://github.com/systemd/systemd/issues/19003. But that is a problem which is much older :thinking: