node-matter icon indicating copy to clipboard operation
node-matter copied to clipboard

"ERROR MdnsBroadcaster Error: send EHOSTUNREACH ff02::fb:5353" on macos

Open Apollon77 opened this issue 2 years ago • 8 comments

On my Macos I get the above error in log

Full log see https://github.com/mfucci/node-matter/issues/181#issue-1524591273

Apollon77 avatar Jan 09 '23 14:01 Apollon77

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...

mfucci avatar Jan 10 '23 01:01 mfucci

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

Apollon77 avatar Jan 10 '23 07:01 Apollon77

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...

mfucci avatar Jan 17 '23 02:01 mfucci

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 ) status: active ap1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400<CHANNEL_IO> ether f2:18:98:2a:d3:0f nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6463<RXCSUM,TXCSUM,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether f0:18:98:2a:d3:0f nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive awdl0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=400<CHANNEL_IO> ether 0a:86:15:6d:25:b5 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=400<CHANNEL_IO> ether 0a:86:15:6d:25:b5 nd6 options=201<PERFORMNUD,DAD> media: autoselect status: inactive en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:fb:3f:23:cc:05 media: autoselect status: inactive en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:fb:3f:23:cc:04 media: autoselect status: inactive en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:fb:3f:23:cc:01 media: autoselect status: inactive en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500 options=460<TSO4,TSO6,CHANNEL_IO> ether 82:fb:3f:23:cc:00 media: autoselect status: inactive en10: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=6467<RXCSUM,TXCSUM,VLAN_MTU,TSO4,TSO6,CHANNEL_IO,PARTIAL_CSUM,ZEROINVERT_CSUM> ether e8:ea:6a:24:a3:76 inet6 fe80::1ca8:37ba:e240:d543%en10 prefixlen 64 secured scopeid 0xd inet 192.168.1.33 netmask 0xffffff00 broadcast 192.168.1.255 nd6 options=201<PERFORMNUD,DAD> media: autoselect (1000baseT <full-duplex,flow-control>) status: active bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=63<RXCSUM,TXCSUM,TSO4,TSO6> ether 82:fb:3f:23:cc: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 11 priority 0 path cost 0 member: en2 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 12 priority 0 path cost 0 member: en3 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 9 priority 0 path cost 0 member: en4 flags=3<LEARNING,DISCOVER> ifmaxaddr 0 port 10 priority 0 path cost 0 nd6 options=201<PERFORMNUD,DAD> media: status: inactive utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::1ba2:65dc:c5f9:d120%utun0 prefixlen 64 scopeid 0xf nd6 options=201<PERFORMNUD,DAD> utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000 inet6 fe80::7496:f730:82b0:806b%utun1 prefixlen 64 scopeid 0x10 nd6 options=201<PERFORMNUD,DAD> utun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1000 inet6 fe80::ce81:b1c:bd2c:69e%utun2 prefixlen 64 scopeid 0x11 nd6 options=201<PERFORMNUD,DAD> utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::3126:b7c1:2a4e:313f%utun3 prefixlen 64 scopeid 0x12 nd6 options=201<PERFORMNUD,DAD> utun4: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380 inet6 fe80::a0:251b:b018:94f8%utun4 prefixlen 64 scopeid 0x13 nd6 options=201<PERFORMNUD,DAD> vboxnet0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether 0a:00:27:00:00:00

JimBuzbee avatar Jan 17 '23 02:01 JimBuzbee

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.

Apollon77 avatar Jan 17 '23 04:01 Apollon77

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)

Apollon77 avatar Jan 17 '23 05:01 Apollon77

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).

jdesai61 avatar Feb 14 '23 15:02 jdesai61

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

Apollon77 avatar Feb 14 '23 15:02 Apollon77