本文介绍了cassandra - 保存的集群名称测试集群!= 配置名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我收到此错误时,我应该如何机器人新的 Cassandra 节点?
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 /var/lib/cassandra/data/system/local/system-local-jb-5 (5725 bytes)
ERROR [main] 2014-02-25 01:51:17,377 CassandraDaemon.java (line 237) Fatal exception during initialization
org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name Test Cluster != configured name thisisstupid
at org.apache.cassandra.db.SystemKeyspace.checkHealth(SystemKeyspace.java:542)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:233)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:462)
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:552)
cassandra.yaml 文件中的集群名称为:
Name of cluster in the cassandra.yaml file is:
cluster_name: 'thisisstupid'
我该如何解决?
推荐答案
您可以通过更新 system.local 表中的名称来重命名集群而不删除数据(但您必须为每个节点执行此操作强>...)
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
最后,您需要将集群重命名为 cassandra.yaml 中的新名称(再次在每个节点上)
Finally you need to rename the cluster to the new name in cassandra.yaml (again on each node)
这篇关于cassandra - 保存的集群名称测试集群!= 配置名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!