Cassandra service startup failure: Saved cluster name Test Cluster != configured name


You may encounter the following error: Saved cluster name Test Cluster != configured name when starting up cassandra or dse service.

Sample output:

# service dse start
Starting DSE daemon : dse
DSE daemon starting with only Cassandra enabled (edit /etc/default/dse to enable other features)
ERROR: DSE failed to start. Please check your logs.

# tail  /var/log/cassandra/debug.log
ERROR [main] 2018-03-29 09:11:35,326  CassandraDaemon.java:705 - Fatal exception during initialization
org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name Test Cluster != configured name cmc_cluster1

Many forums and sites suggested to use cqlsh to update the host name but that may not be an obvious solution as the problem occurs only when cassandra or dse service getting startup. In that scenario, cassandra has not started up, hence cqlsh cannot connect to the db.

# cqlsh
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused")})

Solution:

(1) remove files under /var/lib/cassandra/data/system

# rm -rf /var/lib/cassandra/data/system/*

(2) Edit cassandra.yaml to ensure cluster_name is correct

# vi /etc/dse/cassandra/cassandra.yaml

(if the above file doesn't exist, check this location)

# vi /etc/cassandra/cassandra.yaml

(3) Start dse service, in case of cassandra start cassandra service

# service dse restart  / service cassandra restart

 service dse start
Starting DSE daemon : dse
DSE daemon starting with only Cassandra enabled (edit /etc/default/dse to enable other features)


Post a Comment

1 Comments

  1. This was a decent and amazing post I extremely like it you do the immense work I read this post and it was mind-blowing and exceptional thank you such a great amount for imparting this information to us.for any pan card related quires apply new pan card This was a decent and amazing post I extremely like it you do the immense work I read this post and it was mind-blowing and exceptional thank you such a great amount for imparting this information to us.

    ReplyDelete