[ 
https://issues.apache.org/jira/browse/ARTEMIS-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16571570#comment-16571570
 ] 

ASF GitHub Bot commented on ARTEMIS-1946:
-----------------------------------------

GitHub user JiriOndrusek opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2220

    [ARTEMIS-1946] Cluster with allow-direct-connections-only="true" and …

    …localAddress in netty connections with 
allow-direct-connections-only="true" prevents core bridge to be created.
    
    Issue: https://issues.apache.org/jira/browse/ARTEMIS-1946
    
    LocalAddress and localPort have  to be removed from 
org.apache.activemq.artemis.core.server.cluster.impl.ClusterConnectionImpl.allowableConnections
 in order to compare correctly TransportConfiguration during detection of 
direct connection (these TransportConfiguration don't contain local 
addresses/ports other nodes)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/JiriOndrusek/activemq-artemis 
ARTEMIS-1946_direct-bridge

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2220.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2220
    
----
commit bd635319fe351a58ef7901882f5f76dda5a674df
Author: JiriOndrusek <jondruse@...>
Date:   2018-08-06T15:20:40Z

    [ARTEMIS-1946] Cluster with allow-direct-connections-only="true" and 
localAddress in netty connections with allow-direct-connections-only="true" 
prevents core bridge to be created.

----


> Cluster with allow-direct-connections-only="true" and localAddress in netty 
> connections with allow-direct-connections-only="true"  prevents core bridge 
> to be created.
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1946
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1946
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 1.5.5, 2.7.0
>            Reporter: Jiri Ondrusek
>            Priority: Major
>
> If netty connector, which is used for cluster creation, contains 
> localAddress, core bridge is not created.
> Reasons:
>  # TransportConfiguration with localAddress is saved as allowable connection 
> ([https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java#L279])
>  # Incoming connection (which doesn't contain localAddress) is compared with 
> allwable connections 
> ([https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java#L682)]
>  # If allow-direct-connections-only="true" is set, bridge is not created.
>  
> How to simply reproduce:
>  # define hosts  to resove node1.domain and node2.domain as 127.0.0.1 (in 
> /etc/hosts add "127.0.0.1   node1.domain node2.domain")
>  # Apply changes from commit 
> [https://github.com/JiriOndrusek/activemq-artemis/commit/0a873b6db736f067ef29a7d5db5fecd3541c2090]
>  into sources
>  # Run examples/features/clustered/clustered-static-discovery (mvn verify)
>  # With changes from commit  it will end with exception "Bridge is not 
> working"
>  # If you remove {{allow-direct-connections-only="true" from both brokers, 
> example ends succesfully}}
> Expected result:
>  * bridge is created even if localAddress is used 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to