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

Sylvain Lebresne commented on CASSANDRA-11332:
----------------------------------------------

bq. or it will complain about not being able to find it when it connects to 
itself

I believe you, but it would still be a little bit more useful to have a proper 
stack of the error, or in which way it "complains".

Anyway, my preference for fixing it when it goes to 2.1/2.2/3.0 would be to fix 
it in PFS, having it recognize your {{listen_address}} when asked for it and 
use the BCA instead to figure out the DC and rack. That ought to be simple and 
safe. Changing MessagingService to special case the local path is doable, but 
as said above a tad more involved.

> nodes connect to themselves when NTS is used
> --------------------------------------------
>
>                 Key: CASSANDRA-11332
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11332
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Brandon Williams
>             Fix For: 2.1.x
>
>
> I tested this with both the simple snitch and PFS.  It's quite easy to repro, 
> setup a cluster, start it.  Mine looks like this:
> {noformat}
> tcp        0      0 10.208.8.123:48003      10.208.8.63:7000        
> ESTABLISHED 26254/java
> tcp        0      0 10.208.8.123:7000       10.208.8.63:40215       
> ESTABLISHED 26254/java
> tcp        0      0 10.208.8.123:55559      10.208.35.225:7000      
> ESTABLISHED 26254/java
> tcp        0      0 10.208.8.123:33498      10.208.8.63:7000        
> ESTABLISHED 26254/java
> tcp        0      0 10.208.8.123:7000       10.208.35.225:52530     
> ESTABLISHED 26254/java
> tcp        0      0 10.208.8.123:7000       10.208.35.225:53674     
> ESTABLISHED 26254/java
> tcp        0      0 10.208.8.123:40846      10.208.35.225:7000      
> ESTABLISHED 26254/java
> tcp        0      0 10.208.8.123:7000       10.208.8.63:48880       
> ESTABLISHED 26254/java
> {noformat}
> No problems so far.  Now create a keyspace using NTS with an rf of 3, and 
> perform some writes.  Now it looks like this:
> {noformat}
> tcp        0      0 10.208.8.123:48003      10.208.8.63:7000        
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:7000       10.208.8.123:35024      
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:35024      10.208.8.123:7000       
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:47212      10.208.8.123:7000       
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:7000       10.208.8.63:40215       
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:55559      10.208.35.225:7000      
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:33498      10.208.8.63:7000        
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:7000       10.208.35.225:52530     
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:7000       10.208.35.225:53674     
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:7000       10.208.8.123:47212      
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:40846      10.208.35.225:7000      
> ESTABLISHED 26254/java      
> tcp        0      0 10.208.8.123:7000       10.208.8.63:48880       
> ESTABLISHED 26254/java  
> {noformat}
> I can't think of any reason for a node to connect to itself, and this can 
> cause problems with PFS where you might only define the broadcast addresses, 
> but now you need the internal addresses too because the node will need to 
> look itself up when connecting to itself.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to