问题
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
回答1:
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.
回答2:
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/
来源:https://stackoverflow.com/questions/38961502/cannot-start-cassandra-snitchs-datacenter-differs-from-previous