Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.10.0
-
None
-
None
Description
If no network interface is explicitly set, it calls mcast.joinGroup(inetAddress); without setting one on the MulticastSocket. In that case, MulticastSocket then calls NetworkInterface.getDefault(). The "default" interface on a system is relatively unpredictable and COULD result in a network interface that isn't even multicast enabled. On my mac, it's selecting a "awdl0" interface which doesn't support multicast. If I have Parallels running, it sometimes picks up one of those interfaces. It also sometimes picks up an ipv6 only network interface which also doesn't support the ipv4 broadcast address.
It would be better to enumerate the network interfaces and at least make sure we grab one that support multicast on ipv4 and is "up".
Note: this causes some test failures on my machine. Specifically SpringTest.testSenderWithSpringXmlEmbeddedPooledBrokerConfiguredViaXml fails.