0
votes

I installed DataStax on Ubuntu server (VPS) and I did that step by step according to DataStax's documentations and I enabled (activated) Solr as stated by DataStax's documentations.

I created the keyspace used this query:

create KEYSPACE IF NOT EXISTS "test_db" WITH replication = 
{'class':'NetworkTopologyStrategy', 'Solr':1};

I can Start the CQL interactive terminal (cqlsh) but when I run a query (common CQL in Cassandra) it returns error:

Traceback (most recent call last): File "/usr/bin/cqlsh", line 1124, in perform_simple_statement rows = self.session.execute(statement, trace=self.tracing_enabled) File "/usr/share/dse/cassandra/lib/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", line 1602, in execute result = future.result() File "/usr/share/dse/cassandra/lib/cassandra-driver-internal-only-2.7.2.zip/cassandra-driver-2.7.2/cassandra/cluster.py", line 3347, in result raise self._final_exception Unavailable: code=1000 [Unavailable exception] message="Cannot achieve consistency level ONE" info={'required_replicas': 1, 'alive_replicas': 0, 'consistency': 'ONE'}

If anyone knows the answer of the problem, please guide me

Note: It do not want to have distributed system, and we just have this server for our development and we just want to use it during our development.

Update

This is the latest error that we see in output.log

ERROR 20:45:32,468 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.

And we also ran dse cassandra -Dcassandra.ignore_dc=true according to the error above, but it was not effective and I still have problem!

1
Cannot achieve consistency of 1 means your node is down. Is the process running?phact
@phact I'm sure if it is down or up! How can I turn it up? or run the process? (I am not expert and I'm just new)Mohammad Kermani
Maybe this will helpphact
@phact Thank you. It seems to be useful!Mohammad Kermani

1 Answers

1
votes

I had this problem, I stopped the DSE and restarted that and this worked for me!

Sometimes Cassandra does not work regularly, you may need to change some DSE configurations and the best solution is restarting DSE and test cqlsh again!

I hope that works!