Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

failed to start dse solr node

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?

like image 515
yang Avatar asked Jan 28 '16 09:01

yang


1 Answers

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 **

like image 101
phact Avatar answered Oct 05 '22 19:10

phact