How to remove dead node out of the Cassandra cluster?

This tutorial will helps you to remove unused / dead node from the cassandra cluster ring.

Run the following command in console to list the cluster node ring formation.

[code] nodetool -h <cluster-ip1> ring [/code]

Results of the command it list details as like below:

[code]
Note: Ownership information does not include topology, please specify a keyspace.
Address DC Rack Status State Load Owns Token
129134720650856572100467877009544391173
Cassandra rack1 Up Normal 2.13 GB 36.19% 20560443149910729499380876119296925598
Cassandra rack1 Up Normal 60.37 MB 63.81% 129134720650856572100467877009544391173
Cassandra rack1 Up Normal 1.37 GB 40.30% 234992374923402342349239423423423432123
[/code]

To remove unused / dead node from cluster ring follow the below instruction:

Run nodetool removetoken from one of the up nodes

[code] nodetool removetoken 20560443149910729499380876119296925598 [/code]

Run nodetool cleanup on each node

[code] nodetool cleanup [/code]

If you run the command agian, you can see the given token node has been removed from custer ring.

[code] nodetool -h <cluster-ip1> ring [/code]

Results of the command it list details as like below:

[code]
Note: Ownership information does not include topology, please specify a keyspace.
Address DC Rack Status State Load Owns Token
129134720650856572100467877009544391173
Cassandra rack1 Up Normal 60.37 MB 63.81% 129134720650856572100467877009544391173
Cassandra rack1 Up Normal 1.37 GB 40.30% 234992374923402342349239423423423432123
[/code]

Permanent link to this article: https://blog.openshell.in/2013/05/how-to-remove-dead-node-out-of-the-cassandra-cluster/

Leave a Reply

Your email address will not be published.