cassandra - Saved cluster name Test Cluster != configured name

Solution 1:

You can rename the cluster without deleting data by updating it's name in the system.local table (but you have to do this for each node...)

cqlsh> UPDATE system.local SET cluster_name = 'test' where key='local';
# flush the sstables to persist the update.
bash $ ./nodetool flush

Finally you need to rename the cluster to the new name in cassandra.yaml (again on each node)

Solution 2:

The above commands with UPDATE SET cluster_name does not work for me. I found the working is to follow the instructions from the DataStax documentation on Initializing a multiple node cluster:

sudo service cassandra stop
sudo rm -rf /var/lib/cassandra/data/system/*
sudo vi /etc/cassandra/cassandra.yaml, setup the proper parameters
sudo service cassandra start
nodetool status

For some good cluster node setups, I found this blog post to be very useful.

Solution 3:

I had same issue with Datastax4.7 enterprise edition. I resolved it with above instructions:

Change the cluster name back to "test Cluster"

start the cluster:

cqlsh> UPDATE system.local SET cluster_name = 'Cassendra Cluster' where key='local';
cqlsh> exit;
$ nodetool flush system

Stop the cluster:

$sudo service dse stop;sudo service datastax-agent stop

Edit the file:

$ sudo vi /etc/dse/cassandra/cassandra.yaml
cluster_name: 'Cassendra Cluster'

Start the cluster:

$sudo service dse start;sudo service datastax-agent start

Check Installation log:

 $ cat /var/log/cassandra/output.log

Solution 4:

For Cassandra 3.0.5, I tired the answer by Lyuben Todorov but it was missing a key part:

bash $ ./nodetool flush

should be:

bash $ ./nodetool flush system

as in here

Solution 5:

For Cassandra 3.7 you should replace the ./nodetool flush with ./nodetool flush system. Otherwise it won't work.