High CPU load systemd-resolved on VM NUC

Hi,

I’ve a running installation of HASS OS in a VM on a NUC. The ethernet adapter is in bridged mode. I have multiple VLANs with mDNS enabled on my Unifi Security Gateway.

I see a high CPU load on systemd-resolved (about every half a minute). When I enable debug in the logging, the logs are flooded with the messages below (150MB in a couple of minutes). Does anyone have an idea about what could be causing this?

core-2021.6.0 (seen on 5.x as well)
Home Assistant OS 5.13

2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '192.168.2.67':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '192.168.30.1':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '192.168.2.67':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '192.168.50.1':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '192.168.2.67':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 30) (137 bytes) as [b'\x00\x00\x84\x00\x00\x00\x00\x02\x00\x00\x00\x003homeassistant649 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x19\x00\x00\x00\x00\x00\x00\x10homeassistant649\xc0R']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Received from '192.168.2.67':5353 (socket 30): <DNSIncoming:{id=0, flags=0, n_q=2, n_ans=0, n_auth=3, n_add=0, questions=[question[any,in,homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]._workstation._tcp.local.], question[any,in,homeassistant651.local.]], answers=[record[txt,in-unique,homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]._workstation._tcp.local.]=120/119,b'\x00', record[srv,in-unique,homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]._workstation._tcp.local.]=120/119,homeassistant651.local.:0, record[a,in-unique,homeassistant651.local.]=120/119,192.168.2.67]}> (187 bytes) as [b'\x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x003homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\xff\x00\x01\x10homeassistant651\xc0R\x00\xff\x00\x01\xc0\x0c\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x1e\x00\x00\x00\x00\x00\x00\x10homeassistant651\x05local\x00\xc0]\x00\x01\x80\x01\x00\x00\x00x\x00\x04\xc0\xa8\x02C']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Received from '192.168.40.1':5353 (socket 30): <DNSIncoming:{id=0, flags=0, n_q=2, n_ans=0, n_auth=0, n_add=0, questions=[question[any,in,homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]._workstation._tcp.local.], question[any,in,homeassistant651.local.]], answers=[]}> (116 bytes) as [b'\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x003homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\xff\x00\x01\x10homeassistant651\xc0R\x00\xff\x00\x01']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '192.168.2.67':5353 (socket 30) (116 bytes) as [b'\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x003homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\xff\x00\x01\x10homeassistant651\xc0R\x00\xff\x00\x01']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Ignoring duplicate message received from '172.30.32.1':5353 (socket 30) (116 bytes) as [b'\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x003homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\xff\x00\x01\x10homeassistant651\xc0R\x00\xff\x00\x01']
2021-06-04 09:16:12 DEBUG (zeroconf-Engine-248) [zeroconf] Received from '192.168.2.67':5353 (socket 30): <DNSIncoming:{id=0, flags=32768, n_q=0, n_ans=3, n_auth=0, n_add=0, questions=[], answers=[record[txt,in-unique,homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]._workstation._tcp.local.]=120/119,b'\x00', record[srv,in-unique,homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]._workstation._tcp.local.]=120/119,homeassistant651.local.:0, record[a,in-unique,homeassistant651.local.]=120/119,192.168.2.67]}> (175 bytes) as [b'\x00\x00\x80\x00\x00\x00\x00\x03\x00\x00\x00\x003homeassistant651 [0e1259a0de274c3a94c95a35f4b893c9]\x0c_workstation\x04_tcp\x05local\x00\x00\x10\x80\x01\x00\x00\x00x\x00\x01\x00\xc0\x0c\x00!\x80\x01\x00\x00\x00x\x00\x1e\x00\x00\x00\x00\x00\x00\x10homeassistant651\x05local\x00\x10homeassistant651\xc0R\x00\x01\x80\x01\x00\x00\x00x\x00\x04\xc0\xa8\x02C']

What device has this IP address 192.168.2.67?

That’s my Home Assistant virtual machine.

I’m going through the same thing. CPU pegged at 100%

In my supervisor logs i see:
ERROR (MainThread) [supervisor.api.middleware_security] Invalid token for access /network/interface/default/info

And I tried installing portainer to check the running containers, and it indicates that nothing is running (but container images are there). So it’s kind of pointing me at network issues.

This is a long shot, but would you be running unifi network gear at home? I think i have just fixed my issue by disabling mDNS on my unifi network. Not sure how it worked, but as soon as i switched that off the CPU usage dropped way back to under 15%

I think its because HA is trying to run its own mDNS? But this is an issue because now i cant separate my chromecast devices onto a separate VLAN - They need mDNS to be visible to phones and HA on my main network.

For me it’s the same. When I switch off mDNS in Unifi I don’t have any issues in HA anymore.
However that’s not a preferred solution as I have my chromecast devices in another VLAN as well.

Hi,

Did you try to disable mDNS on the HA OS?
I had a similar issue and this step fixed it for me: Hostname conflict, changing published hostname from 'homeassistantxxx' to 'homeassistantxxy' · Issue #1163 · home-assistant/operating-system · GitHub

I disabled mdns and afterwards reanabled the mdns-service again on the HA OS. CPU load dropped and stable since 6 days.

I’ve tried it today. For now it looks good. I don’t understand it but CPU load remains stable low. Let’s see in some days and maybe some reboots later.