Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5520

MulticastDiscoveryAgent may use a network that is not multicast enabled, fails to startup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.10.0
    • 5.11.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.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            dkulp Daniel Kulp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: