Im trying to start DSE 5.0.1 Cassandra (Single node) in my local.
Getting below error:
CassandraDaemon.java:698 - Cannot start node if snitch's data center (Cassandra) differs from previous data center (Graph). Please fix the snitch configuration, decommission and rebootstrap this node or use the flag -Dcassandra.ignore_dc=true
This occurs when the node starts and see's that it has information indicating that it was previously part of a different datacenter. This occurs if the datacenter was different on a prior boot and was then changed.
In your case you are most likely using DseSimpleSnitch
which names the Datacenter based on the workload of that node. Previously the node was started with Graph enabled which turned the name to Graph
. Now trying to start it without Graph enabled leads to it naming the Datacenter Cassandra
which is the default.
Using the -Dcassandra.ignore_dc=true
flag will allow you to proceed but a better solution would be to switch to GossipingPropertyFileSnitch
and give this machine a dedicated datacenter name.
Another option (if you are just testing) is to wipe out the data directory as this will clear out the information previously labeling the datacenter for the node. This will most likely be sudo rm -R /var/lib/cassandra/
If you are using GossipingPropertyFileSnitch, start Cassandra with the option
-Dcassandra.ignore_dc=true
If it starts successfully, execute:
nodetool repair
nodetool cleanup
Afterwards, Cassandra should be able to start normally without the ignore option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With