5
votes

I'm trying datastax enterprise 4.8.4 on ubuntu. Installation is OK following the instructions. I can start a cassandra node with the command sudo service dse start. Then I want to try restart as a solr node on the same machine. So I edit the /etc/default/dse and set SOLR_ENABLED=1. Now I tried to start cassandra again, it failed.

@ubuntu:~$ sudo service dse start
* Starting DSE daemon dse                                                                                 
DSE daemon starting with Solr enabled (edit /etc/default/dse to disable)
[ OK ]
@ubuntu:~$ sudo service dse status
* dse is running

@ubuntu:~$ sudo service dse status
* dse is not running

I checked the /var/log/cassandra/system.log. Here's the error message:

ERROR [main] 2016-01-28 16:44:02,767  CassandraDaemon.java:294 - Fatal exception during initialization   
org.apache.cassandra.exceptions.ConfigurationException: Cannot start 
node if snitch's data center (Solr) differs from previous data center 
(Cassandra). Please fix the snitch configuration, decommission and 
rebootstrap this node or use the flag -Dcassandra.ignore_dc=true.

The question is how could I fix it? or where do I add -Dcassandra.ignore_dc=true?

2
by editing /etc/dse/cassandra/cassandra-rackdc.properties, I managed to get dse running. But still don't know when it is changed by what command and how the dc and rack settings should be set. - yang

2 Answers

10
votes

As of 2.1.13 you are not allowed to change the data center of an existing node. This is to protect users from making a mistake in production since changing data center (DC) names in a live system will result in downtime.

The DSE simple snitch assigns nodes to logical data centers based on workload type. I.E. solr nodes will be added to a solr DC, Cassandra nodes will be added to a Cassandra data center. If you change the workload type using DSE simple snitch you change the DC name which is not permitted by default.

If this is a test environment and you know what you're doing (you are willing to incur the breif downtime while all the nodes in your DC are changed to a new DC) you can submit the following jvm flag in your cassandra-env.sh

-Dcassandra.ignore_rack=true and/or

-Dcassandra.ignore_dc=true.

**make sure your topology after the DC / name change is still the same, otherwise replication can get messed up and you can end up with a lot of streaming + CPU utilization + io + stale reads **

0
votes

Below are the steps you can take to solve the problem -

Error : - CassandraDaemon.java:709 - Cannot start node if snitch's data center (Cassandra) differs from previous data center (SearchGraphAnalytics).

Solution : -

  1. Change the network topology to GossipingPropertyFileSnitch from SimpleSnitch in Cassandra.yaml file , placed at /usr/share/dse/resource/cassandra/conf ( if installed as no service)

  2. Create a properties file with datacenter and rack information if not exists .

    • Path : /usr/share/dse/resource/cassandra/conf

    • filename: cassandra-rackdc.properties

    And add the below entries -

    --indicate the rack and dc for this node dc=SearchGraphAnalytics // the previous name of your DC before upgrading rack=RAC1
    
  3. If Gremlin server Error persists then run the graph using below parameters -

    This error may com when DataStax Enterprise was installed from a tarball or from the DataStax Installer with the No Services option.

    Start the dse using the below parameters : -

    /usr/share/dse$ bin/cassandra -g -s -k