node-matter
node-matter copied to clipboard
"ERROR MdnsBroadcaster Error: send EHOSTUNREACH ff02::fb:5353" on macos
On my Macos I get the above error in log
Full log see https://github.com/mfucci/node-matter/issues/181#issue-1524591273
The MDNS server tries to broadcast to the MDNS address but seem to fail on one interface.
In MdnsServer can you add a log in announce() method to log the netInterface name? Can you also list the interfaces on your system with "ifconfig" or "ipconfig" from a terminal?
We should probably ignore some interfaces...
i added catch in the "send" queue in announce to get all catches (and not only the first):
en5 : Error: send EHOSTUNREACH ff02::fb:5353 utun2 : Error: send EMSGSIZE ff02::fb:5353
my ifconfig looks like:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:de:48:00:11:22
inet6 fe80::aede:48ff:fe00:1122%en5 prefixlen 64 scopeid 0x4
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (100baseTX <full-duplex>)
status: active
ap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether aa:66:5a:44:3c:4c
media: autoselect
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 88:66:5a:44:3c:4c
inet6 fe80::1c30:855c:9d80:6e0c%en0 prefixlen 64 secured scopeid 0x6
inet 192.168.2.54 netmask 0xfffffc00 broadcast 192.168.3.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
awdl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether 92:08:b6:53:ab:9b
inet6 fe80::9008:b6ff:fe53:ab9b%awdl0 prefixlen 64 scopeid 0x7
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 82:cb:98:e1:18:01
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 10 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 11 priority 0 path cost 0
member: en3 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 12 priority 0 path cost 0
member: en4 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 13 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: <unknown type>
status: inactive
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 92:08:b6:53:ab:9b
inet6 fe80::9008:b6ff:fe53:ab9b%llw0 prefixlen 64 scopeid 0x9
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: inactive
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:cb:98:e1:18:01
media: autoselect <full-duplex>
status: inactive
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:cb:98:e1:18:00
media: autoselect <full-duplex>
status: inactive
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:cb:98:e1:18:05
media: autoselect <full-duplex>
status: inactive
en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:cb:98:e1:18:04
media: autoselect <full-duplex>
status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::8d24:8519:c616:4114%utun0 prefixlen 64 scopeid 0xe
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::b048:f434:61bd:1fbe%utun1 prefixlen 64 scopeid 0xf
nd6 options=201<PERFORMNUD,DAD>
utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1000
inet6 fe80::ce81:b1c:bd2c:69e%utun2 prefixlen 64 scopeid 0x10
nd6 options=201<PERFORMNUD,DAD>
utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::7993:d322:acf2:3e7%utun3 prefixlen 64 scopeid 0x11
nd6 options=201<PERFORMNUD,DAD>
utun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::a77f:939e:3cf1:533b%utun4 prefixlen 64 scopeid 0x12
nd6 options=201<PERFORMNUD,DAD>
en9: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether a0:ce:c8:6c:40:cf
inet6 fe80::cc:8e3f:675:e7d2%en9 prefixlen 64 secured scopeid 0x16
inet 192.168.68.23 netmask 0xfffffc00 broadcast 192.168.71.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (1000baseT <full-duplex>)
status: active
How do you have some many interfaces? :-) I have only two, lo and en, on my machine...
utun2: the configuration of this interface seems incorrect. Per Matter specs: 4.4.4, "the expected supported MTU is 1280 bytes, the minimum required by IPv6" Since this is an IPv6 interface, the MTU should be at least 1280 and this explains the EMSGSIZE I don't see any way to get access to MTU from node.js so I cannot ignore interfaces with an unsupported MTU...
en5: not sure why it is not possible to broadcast MDNS messages on this interface. Do you have any idea what is this interface? Seems to be a 100Mps wired ethernet... Is this directly your ISP connection? In this case, that might explain why MDNS is not accepted...
I've got a similar set of (confusing) interfaces on my Macbook. Must be an OSX thing. Physically, it's currently hooked up via a USB to Ethernet device through a switch, router, and then out to the Internet.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:de:48:00:11:22
inet6 fe80::aede:48ff:fe00:1122%en5 prefixlen 64 scopeid 0x4
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (100baseTX
No idea where all these interfaces come from. It is also in my case for the above list hooked with an usb-c dock and an apple monitor (both with 1g Ethernet options, monitor used) ... but have the same error when only usb-c hub is used. And I think same if I only use Wi-Fi - but need to re check.
m interface list is kind of the same even if no USB-C is connected ... but tere is Cisco VPN client installed and also such ... so no idea ... (and no, no direct internet provider connection or such)
Installing docker or other virtualization components usually creates many virtual network interfaces. I see these types of interfaces on all my VMs (on QNAP or Proxmox or similar platforms).
Yes I also see that on my mac as stated ... the Github version will just logbut ignore this. It seems we need to do a better job in selecting "the right" interface to announce and which not to ... but for now it is no real issue