-1

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?

Syed Mhamudul Hasan
  • 1,341
  • 2
  • 17
  • 45

2 Answers2

2

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;
Jaya Ananthram
  • 3,433
  • 1
  • 22
  • 37
  • There is another problem i am facing this is my **Cassandra CQL Shell** not starting ? why ? – Syed Mhamudul Hasan Apr 04 '16 at 10:18
  • What error you are facing while trying to executing CQL shell? – Jaya Ananthram Apr 04 '16 at 10:23
  • By Default, cqlsh will try to connect through 127.0.0.1 but if you start cassandra with private IP as listen_address (In cassandra.yaml) then you need to start cqlsh by, cqlsh – Jaya Ananthram Apr 04 '16 at 10:33
  • Where to modify **cqlsh** ?? – Syed Mhamudul Hasan Apr 04 '16 at 10:43
  • You dont need to modify just try to start in command prompt as `>cqlsh xxx.xx.20.3` where xxx.xx.20.3 is the IP that you have been configured for `listen_address` in cassandra.yaml – Jaya Ananthram Apr 04 '16 at 10:50
  • My listen address is `listen_address: localhost ` in **cassandra.yaml** and cmd showing `cqsql is not recognized as an internal or external command, operable program or batch file.` – Syed Mhamudul Hasan Apr 04 '16 at 10:53
  • What exception are you getting? Image that you have uploaded is different from the above comment. The command is `cqlsh` not `cqsql` – Jaya Ananthram Apr 04 '16 at 10:57
  • If you configured listen_address as `localhost` then try to start in command prompt as `cqlsh localhost` – Jaya Ananthram Apr 04 '16 at 11:02
  • @syedmhamudulhasanakash If this post has answered your initial question, then please mark it as such. If you have additional question(s), then please ask a new question, but don't carry on an extended discussion in the comments. – Aaron Apr 04 '16 at 13:13
0

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.

Community
  • 1
  • 1
Syed Mhamudul Hasan
  • 1,341
  • 2
  • 17
  • 45