Datageek
Datageek

Reputation: 26719

Cassandra - can't remove the nodes

I've accidently added new nodes to the test cluster. I removed the nodes afterwards but they still appear when connecting to the cluster.

The nodetool gossipinfo doesn't show them. The nodetool ring doesn't either but when connecting via the datastax Java client they do appear:

LOG4J 2015-05-06 15:44:54.796 INFO : [Cluster] - New Cassandra host /198.81.xxx.32 added LOG4J 2015-05-06 15:44:54.797 INFO : [Cluster] - New Cassandra host /198.81.xxx.31 added

How do I remove these nodes from the gossip cache/events, where do they come from?

Upvotes: 1

Views: 737

Answers (2)

Datageek
Datageek

Reputation: 26719

Ravindra shows how to remove the node using the nodetool "removenode". This didn't work for me as the nodes were not shown in the nodetool "status". What worked for me in this situation is the method exposed through JMX. See: http://docs.datastax.com/en/cassandra/2.0/cassandra/operations/ops_gossip_purge.html

Use method: Gossiper.unsafeAssassinateEndpoints(ip_address)

Hope this will help someone.

Upvotes: 2

Ravindra Kumar
Ravindra Kumar

Reputation: 137

I am new to Cassandra and I have tried adding and removing nodes. I followed these steps. 1. Stop Casssandra services on node to be removed. 2. Copy the host ID of the node to be removed. (Just run the nodetool status and copy host id) 3. Now remove the node using removenode( nodetool -h removenode < Host ID> I tried using datastax Java client and the removed node didn't appear for me anywhere. for me, it was a successful"Unbootstrap Operation".

Upvotes: 1

Related Questions