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

updateClusterClients with multiple NICs: wrong hostnames

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 5.6.0
    • None
    • Broker

    Description

      TcpTransportServer's instance variable 'connectURI' is initialised when the socket is bound. If the address is ANY ADDRESS (0.0.0.0) in a multi-NIC machine, the socket is bound to all NICs, but only a single connect URI is registered.

      InetAddressUtil.getLocalHostName() is invoked to calculate the connect URI.

      The connectURI is used to represent the current broker when the list of peers is populated as part of the updateClusterClients feature.

      In real life, a client transport connection could come in from any NIC, where each NIC has a different hostname. So it's easy to send back a wrong hostname in the updated list to the client.

      I propose a solution comprised of the following changes:

      • Remember the actual connect URI for each individual transport connection and use that for the current broker in the updated connect list.
      • Turn the connectURI variable on TcpTransportServer into a List<String>.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            raulvk Raúl Kripalani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment