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

Yuki Morishita commented on CASSANDRA-9031:
-------------------------------------------

Thanks for the review.

I guess the reason we are doing weired implementation for nodetool now is lack 
of the way to get endpoint, dc and rack info of connected node straight from 
JMX.
We can add JMX interface for those in 3.0. (will create that later.)

For fix in 2.1 and 2.2, I think we need to stick with what we have for now.

> nodetool info -T throws ArrayOutOfBounds when the node has not joined the 
> cluster
> ---------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9031
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9031
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Ron Kuris
>            Assignee: Yuki Morishita
>             Fix For: 2.1.x
>
>         Attachments: patch.txt
>
>
> To reproduce, bring up a node that does not join the cluster, either using 
> -Dcassandra.write_survey=true or -Dcassandra.join_ring=false, then run 
> 'nodetool info -T'. You'll get the following stack trace:
> {code}ID                     : e384209f-f7a9-4cff-8fd5-03adfaa0d846
> Gossip active          : true
> Thrift active          : true
> Native Transport active: true
> Load                   : 76.69 KB
> Generation No          : 1427229938
> Uptime (seconds)       : 728
> Heap Memory (MB)       : 109.93 / 826.00
> Off Heap Memory (MB)   : 0.01
> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, 
> Size: 0
>       at java.util.ArrayList.rangeCheck(ArrayList.java:635)
>       at java.util.ArrayList.get(ArrayList.java:411)
>       at org.apache.cassandra.tools.NodeProbe.getEndpoint(NodeProbe.java:676)
>       at 
> org.apache.cassandra.tools.NodeProbe.getDataCenter(NodeProbe.java:694)
>       at org.apache.cassandra.tools.NodeCmd.printInfo(NodeCmd.java:666)
>       at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1277){code}
> After applying the attached patch, the new error is:
> {code}ID                     : a7d76a2a-82d2-4faa-94e1-a30df6663ebb
> Gossip active          : true
> Thrift active          : false
> Native Transport active: false
> Load                   : 89.36 KB
> Generation No          : 1427231804
> Uptime (seconds)       : 12
> Heap Memory (MB)       : 135.49 / 826.00
> Off Heap Memory (MB)   : 0.01
> Exception in thread "main" java.lang.RuntimeException: This node does not 
> have any tokens. Perhaps it is not part of the ring?
>       at org.apache.cassandra.tools.NodeProbe.getEndpoint(NodeProbe.java:678)
>       at 
> org.apache.cassandra.tools.NodeProbe.getDataCenter(NodeProbe.java:698)
>       at org.apache.cassandra.tools.NodeCmd.printInfo(NodeCmd.java:676)
>       at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:1313){code}



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

Reply via email to