Reputation:
I am using Cassandra 2.0 and cluster has been setup with 3 nodes. Nodetool status and ring showing all the three nodes. I have specified tokens for all the nodes.
I followed the below steps to change the configuration in one node:
1) sudo service cassandra stop
2) updated cassandra.yaml (to update thrift_framed_transport_size_in_mb)
3) sudo srevice cassandra start
The specific not started successfully and system.log shows below exception:
org.apache.cassandra.exceptions.ConfigurationException: Cannot change the number of tokens from 1 to 256
What is best mechanism to restart the node without losing the existing data in the node or cluster ?
Upvotes: 2
Views: 6092
Reputation: 509
I was also getting this error while I was trying to change the number of tokens from 1 to 256. To solve this I tried the following:
Scenario: I have 4 node DSE (4.6.1) cassandra cluster. Let say their FQDNs are: d0.cass.org, d1.cass.org, d2.cass.org, d3.cass.org. Here, the nodes d0.cass.org and d1.cass.org are the seed providers. My aim is to enable nodes by changing the num_token attribute in the cassandra.yaml file.
Procedure to be followed for each node (one at a time):
nodetool decommission
ps ax | grep dse
and kill <pid>
nodetool status
. The decommissioned node should not appear in the list.nodetool rebuild
dse cassandra
command.This should work.
Upvotes: 3
Reputation: 16576
Switching from Non-Vnodes to Vnodes has been a slightly tricky proposition for C* and the mechanism for previously performing this switch (shuffle) is slightly notorious for instability.
The easiest way forward is to start fresh nodes (in a new datacenter) with vnodes enabled and to transfer data to those nodes via repair.
Upvotes: 3