DATASTAX Cassandra Cluster naming stops windows services in WINDOWS 8 - cassandra

I have downloaded cassandra datastax-ddc-64bit-3.4.0.msi and installed it to WINDOWS 8 .I runs ok. But when i edit cassandra.yaml
cluster_name: 'Test Cluster'
to
cluster_name: 'MyCluster1'
then the services does not start.
I check error log in C:\Program Files\DataStax-DDC\logs\datastax_ddc_server-stdout.2016-04-04.log.
it shows
ERROR 09:08:34 Fatal exception during initialization
org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name Test Cluster != configured name MYCLUSTER
at org.apache.cassandra.db.SystemKeyspace.checkHealth(SystemKeyspace.java:915) ~[apache-cassandra-3.4.0.jar:3.4.0]
at org.apache.cassandra.service.StartupChecks$8.execute(StartupChecks.java:297) ~[apache-cassandra-3.4.0.jar:3.4.0]
at org.apache.cassandra.service.StartupChecks.verify(StartupChecks.java:106) ~[apache-cassandra-3.4.0.jar:3.4.0]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:169) [apache-cassandra-3.4.0.jar:3.4.0]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:551) [apache-cassandra-3.4.0.jar:3.4.0]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:680) [apache-cassandra-3.4.0.jar:3.4.0]
what is the problem with my cluster name ??? Am i missing something??? why there are 3 log files in Log directory?

The reason is, the saved cluster name value is not equal to the configured cluster name. Which means, Once if you start the cassandra for very first time, it will take the cluster name from yaml configuration file and save the cluster name in the column family local which is available in system keyspace. So if you try to restart it again for second time, it will try to retrieve the cluster name from the saved data (system.local) and compare it with yaml configration. So In your case you have created the cluster in the name of Test Cluster for the very first time, so the cassandra expects the cluster name as Test Cluster for every startup process. If you want to change the cluster name then this link explains the step more clearly. You can retrieve the saved cluster name by the following cql query,
select * from system.local;

After trying and found an answer on link
Empty the /var/lib/cassandra/data ,/var/lib/cassandra/commitlog
,/var/lib/cassandra/saved_caches directory and restart Casandra after
changing cluster name . This works very well in version 1.2.4 ,try
with your version .
It is recommended to use stable release of in envelopment product, if
not done with above use 1.2.5 or 1.2.4 instead.

Related

cassandra.yaml changes not working at all

Im new using Cassandra 3.11.4, and just installed it on a ubuntu VM, and following the instructions, I tried to change the cluster name on the .yaml config file, but when I save the doc, and go Start Cassandra, it throws a failure, and this happens with anything I change on the .yaml file, it just doesn't work the way documentation says it should(I located the Cassandra files in a location where my user has all permissions)
enter image description here. enter image description here
If I make no changes to the file, and Start Cassandra, it does successfully.
I found out that I can change the cluster name or listen address, or any other parameter listed on the .yaml file successfully after connecting the database and querying for example
update cluster_name from system.local where cluster_name='Test Cluster';
but that's not the point of having the .yaml conf file.
Does someone know why this happens?
I've had this issue even using other Cassandra versions, like 3.11.2
Thanks in advance.
In Cassandra you can't simply change some configuration parameters and except it to work after restart. cluster_name is not specific to the node. It is applicable to entire cluster. parameters like data_file_directories can be changed at node level.
And if you want to change the name of cluster it is whole different process. Refer below link
https://support.datastax.com/hc/en-us/articles/205289825-Change-Cluster-Name-

Elassandra Integration with Existing Cassandra Instance

I'm trying to learn Elassandra and am having an issue configuring it to my current Cassandra instance (I'm learning Cassandra as well).
I downloaded version 3.11.3 of Cassandra to my local computer. I didn't change anything except the cluster_name inside of cassandra.conf. It runs fine and I used bin/cqlsh to create a keyspace and a "user" table with a couple of rows for testing.
I followed the steps on the Elassandra integration page. I downloaded version 6.2.3.10 of Elassandra. I replaced the cassandra.yaml, cassandra-rackdc.properties and cassandra-topology.properties in the Elassandra conf with the ones from the Cassandra conf (I am assuming those last 2 are the "snitch configuration file" mentioned in the instructions but I'm not sure). I stopped my Cassandra instance and then ran the bin/cassandra -e f from my Elassandra directory.
When I run curl -X GET localhost:9200, the output seems to have my correct cluster name, etc.
However, if I run bin/cqlsh from my Elassandra directory and run describe keyspaces, the keyspace I created under Cassandra isn't there. I tried copying the data directory from Cassandra to Elassandra and that seemed to work, but I feel this can't possibly be the actual solution.
Can someone point me to what I am missing in regards to this configuration? With the steps being listed on the website, I'm sure there must be some dumb thing I'm missing.
Thanks in advance.

Unable to start DSE using SPARK_ENABLED=1

We are running 6 node cluster with:
HADOOP_ENABLED=0
SOLR_ENABLED=0
SPARK_ENABLED=0
CFS_ENABLED=0
Now, we would like to add Spark to all of them. It seems like "adding" is not the right term because this would not fail. Anyways, the steps we've done:
1. drained one of the nodes
2. changed /etc/default/dse to SPARK_ENABLED=1 and HADOOP_ENABLED=0
3. sudo service dse restart
And got the following in the log:
ERROR [main] 2016-05-17 11:51:12,739 CassandraDaemon.java:294 - Fatal exception during initialization
org.apache.cassandra.exceptions.ConfigurationException: Cannot start node if snitch's data center (Analytics) differs from previous data center (Cassandra). Please fix the snitch configuration, decommission and rebootstrap this node or use the flag -Dcassandra.ignore_dc=true.
There are two related questions that have been already answered:
Unable to start solr aspect of DSE search
Two node DSE spark cluster error setting up second node. Why?
Unfortunately, clearing the data on the node is not an option - why would I do that? I need the data to be intact.
Using "-Dcassandra.ignore_rack=true -Dcassandra.ignore_dc=true" is a bit scary in production. I don't understand why DSE wants to create another DC and why can't it just use the existing one?
I know that according to datastax's doc one should partition the load using different DC for different workloads. In our case we just want to run SPARK jobs on the same nodes that Cassandra is running using the same DC.
Is that possible?
Thanks!
The other answers are correct. The issue here is trying to warn you that you have previously identified this node as being in another DC. This means that it probably doesn't have the right data for any key-spaces with Network Topology Strategy. For example if you had a NTS keyspace which had only one replica in "Cassandra" and changed the DC to "Analytics" you could inadvertently lose all of the data.
This warning and the accompanying flag are telling you that you are doing something that you should not be doing in a production cluster.
The real solution to this is to explicitly name your dc's using GossipingFileSnitch and not rely on SimpleSnitch which names based on the DSE workload.
In this case, switch to GPFS and set the DC name to Cassandra.

Changing Cluster Name in Cassandra

I have a cluster with 2 machines (centos7 and cassandra 3.4), 192.168.0.175 and 192.168.0.174. The seed is the 192.168.0.175.
I simply want to change the cluster name. Peace of cake should be.
I did on each cluster :
update system.local set cluster_name = 'America2' where key='local';
i did the nodetool flush
i updated the cassandra.yaml with the new name
restarted cassandra.
When i cqlsh any if describes me as connected to new cluster_name America2
When i run nodetool describecluster it shows the old cluster name America
If i stop cassandra on both machines and i try to restart them i find in logs the good old error :
org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name America != configured name America2
So....what am i doing wrong!?
before changing cluster name
delete node from cluster ring
nodetool decommission
stop node and change cluster name in cassandra.yaml
clean node
sudo rm -rf /var/lib/cassandra/* /var/log/cassandra/*
start cassandra node
More information you can find at academy.datastax.com
Ok guys, what i did :
cqlsh with each machine and :
update system.local set cluster_name = 'canada' where key='local' ;
then
$ nodetool flush -- system
then i stoped the service on both machines.
modified the cassandra.yaml with new cluster name canada.
started back the machines, they were working with new cluster name.
It is possible to do those steps without stoping all machines in the cluster, taking them out one by one( i think a repair on each node might be neccessary after ). Consider changing the seeds first.
It's not really possible. I had the same problem. I solved this in a really dirty way. I wrote a script where i got all my column family data. Simply: A backup. Then i done this on each node: i stopped cassandra, i dropped all cassandras data, cache etc. (You can also reinstall cassandra.) i created a new cluster imported my backup. And i done this for each node.

How to use sstableloader from a node not in Cassandra Cluster ring

we are using apache-cassandra 1.1.9 version on Production Cassandra Cluster on linux.I want to upload some data using sstableloader.
I was able to generate sstables for a small data and then tried to upload these sstables into Cassandra Cluster using sstableloader from another machine(which is in same network but not in cassandra cluster ring) but get below error
"Could not retrieve endpoint ranges:"
I do not understand why this error is coming.
This machine , where i am running sstableloader, has same cassandra installation.I copied the cassandra.yaml from production cassandra into my host machine's apache-cassandra/conf folder.
My sstables are in below directory structure:-
/path/to/keyspace dir/Keyspace/*.db
SStable command I am running is below
./sstableloader -d -i , /home/Data/Keyspace/
Could not retrieve endpoint ranges:
Please advise , if i am doing wrong here ?
Found the solution.
The sstableloader command needs to be executed from the directory containing the Keyspace subdirectory.
For e.g
if /home/Data is the directory structure, under which there is sub directories keyspace/ColumnFamily/
then execute command like below from /home/Data/ directory.
~/apache-cassandra/bin/sstableloader -d /keyspace/ColumnFamily
This is a bit old, but I ran into the "Could not retrieve endpoint ranges" error recently with a different root cause.
In our case, data was being exported from a production system, and loaded to a new development instance. The development instance had been incorrectly set up so the sstables were generated using dse 4.7, and the sstableloader being run was dse 4.6.
Note that it is possible to ingest tables from 4.6 into dse 4.7 for debugging, etc, but that it is necessary to run nodetool upgradesstables first. That isn't what was going on here.

Resources