cassandra修改了cluster_name后无法启动

已经启动过的node,如果改了配置的clustername,再启动就会报错

org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name Test Cluster != configured name xxx

这是因为已经写到系统表里了。改名字相当于换集群

处理方法一:更新系统表

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

处理方法二:因为理论上换了集群老数据就没用了,所以直接rm -rf /data/cassandra之类的数据目录,包括data, commitlog。删干净了再启动即可

 

posted @ 2018-01-03 11:51  Els0n  阅读(799)  评论(0编辑  收藏  举报