cassandra - Saved cluster name Test Cluster != configured name

前端 未结 7 2003
无人共我
无人共我 2020-12-02 12:10

How am I supposed to bot a new Cassandra node when I get this error?

INFO [SSTableBatchOpen:1] 2014-02-25 01:51:17,132 SSTableReader.java (line 223) Opening          


        
相关标签:
7条回答
  • 2020-12-02 12:35

    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)

    0 讨论(0)
  • 2020-12-02 12:35

    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

    0 讨论(0)
  • 2020-12-02 12:35

    If cassandra is not running, you can wipe the data folder.

    rm -rf /usr/lib/cassandra/data/*
    

    This will clear the system tables which had the wrong cluster name. \ When your restart cassandra with the correct cluster name in your cassandra.yaml everything will be regenerated and you should be good.

    0 讨论(0)
  • 2020-12-02 12:43

    For Bitnami certified Cassandra - 3.11.5

    Here's the solution that worked for me:

    1. Stop the Cassandra service
    sudo /opt/bitnami/ctlscript.sh stop cassandra
    
    1. Remove the system data
    sudo rm -rf /opt/bitnami/cassandra/data/data/system/*
    
    1. Start the Cassandra Service
    sudo /opt/bitnami/ctlscript.sh start cassandra
    
    0 讨论(0)
  • 2020-12-02 12:45

    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
    
    0 讨论(0)
  • 2020-12-02 12:48

    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.

    0 讨论(0)
提交回复
热议问题