Raul Kripalani created AMQ-4023:
-----------------------------------

             Summary: updateClusterClients with multiple NICs: wrong hostnames
                 Key: AMQ-4023
                 URL: https://issues.apache.org/jira/browse/AMQ-4023
             Project: ActiveMQ
          Issue Type: New Feature
          Components: Broker
    Affects Versions: 5.6.0
            Reporter: Raul Kripalani


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


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to