sai
sai

Reputation: 63

Cassandra: Changing snitch property and then starting the Cassandra Node, gives error

I was trying to learn Cassandra. I got the below error (As mentioned in point 4 ), when tried to follow the below steps.

1) I had downloaded Cassandra from Datastax and made another copy of the same and named both folders into node1 and node2.

2) Changed the endpoint_snitch to GossipingPropertyFileSnitch in Cassandra.yaml in both the nodes

3) In /home/ubuntu/node1/resources/cassandra/conf/cassandra-rackdc.properties

changed for Node1 as: dc=west-side rack=hakuna-matata

changed for Node2 as: dc=east-side rack=hakuna-matata

4) Started Node2. Getting error as below:

"Cannot start node if snitch's data center (east-side) differs from previous data center (Cassandra). Please fix the snitch configuration, decommission and rebootstrap this node or use the flag -Dcassandra.ignore_dc=true"

Steps Tried to resolve it:

1) Stopped the node and deleted the /var/lib/cassandra/data folder -- It didn't work

2) Reverted all the property changes --> It is working.

3) Tried with the steps mentioned in Cannot start Cassandra - Snitch's Datacenter Differs from Previous. --> It did not work

Please let me know, why changing the snitch properties is giving the error (as mentioned above)

Upvotes: 1

Views: 583

Answers (1)

Alex Ott
Alex Ott

Reputation: 87329

From what you describing, it looks like that you already started the node as-is, because Cassandra datacenter name is given when you're started the DSE with DseSimpleSnitch.

To resolve this problem, you need:

  1. Make sure that both instances point to different data directories, have different commit log directories, hints, etc. It's better to point to 2 separate clear directories.
  2. If you're using DSE 6 for experiments, having 2 instances on the same node will require an additional tuning, that it's better to avoid at beginning.

If you want to have multiple instances of Cassandra/DSE for experiments, use of Docker could be easier, like shown here: https://github.com/datastax/docker-images (see examples folder). Another possibility is to use DataStax Desktop that allows easier provision of the Docker-based instances - you can play with different versions, etc.

Upvotes: 1

Related Questions