Cassandra – Unable to meet the consistency level One: info = {‘Required_replicas’: 1, ‘alive_replicas’: 0, ‘Constensency’: 1}

In my Cassandra setup, it seems that the keyspace copy is not happening correctly. I need some ideas to solve this problem. I have configured a multi-data center cluster, but first I set up the secret Key space to use SimpleStrategy and RF 3.

Column family exists:

cqlsh:kairosdb> select columnfamily_name from system.schema_columnfamilies where keyspace_name = 'kairosdb';

columnfamily_name
-------------------
data_points
row_key_index
string_index

(3 rows)

But I can’t query them:

cqlsh:kairosdb> select count(*) from data_points limit 100000;
Traceback (most recent call last):
File "/usr/bin/cqlsh", line 957, in perform_simple_statement
rows = self.session.execute(statement, trace =self.tracing_enabled)
File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.1.1.post.zip/cassandra-driver-2.1.1.post/cassandra/cluster. py", line 1282, in execute
result = future.result(timeout)
File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.1.1.post.zip /cassandra-driver -2.1.1.post/cassandra/cluster.py", line 2776, 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': 1}

This is how I set up multiple data centers:

>In the seed list Use 2 nodes for each DC
>Use org.apache.cassandra.locator.GossipingPropertyFileSnitch for the Snitch
>Specify different DC names for the nodes in cassandra-rackdc.properties

This is to create a keyspace:

cqlsh:kairosdb> describe keyspace kairosdb;

CREATE KEYSPACE kairosdb WITH replication = {'class':'SimpleStrategy' ,'replication_factor': '3'} AND durable_writes = true;

Do I have any ideas to solve this problem?

In your key space creation, you have the following syntax:

CREATE KEYSPACE kairosdb WITH replication = {'class':'SimpleStrategy','replication_factor': '3'} AND durable_writes = true;

But if you If you want to use replication across data centers (DC), you need to use NetworkTopologyStrategy, for example:

CREATE KEYSPACE kairosdb WITH replication = {'class':'NetworkTopologyStrategy','DC1': 3,'DC2': 3};

According to the following document link, “When you (or plan to have) a cluster deployed across multiple data centers, please use NetworkTopologyStrategy…”

< p>http://www.datastax.com/documentation/cassandra/2.0/cassandra/architecture/architectureDataDistributeReplication_c.html

It looks like keyspace in my Cassandra settings The replication did not happen correctly, I need some ideas to solve this problem. I have configured a multi-data center cluster, but first I set up the key space to use SimpleStrategy and RF 3.

Column family Exist:

cqlsh:kairosdb> select columnfamily_name from system.schema_columnfamilies where keyspace_name ='kairosdb';

columnfamily_name
---- ---------------
data_points
row_key_index
string _index

(3 rows)

But I can’t query them:

cqlsh:kairosdb> select count(*) from data_points limit 100000;
Traceback (most recent call last):
File "/usr/bin/cqlsh", line 957, in perform_simple_statement
rows = self.session.execute(statement, trace =self.tracing_enabled)
File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.1.1.post.zip/cassandra-driver-2.1.1.post/cassandra/cluster. py", line 1282, in execute
result = future.result(timeout)
File "/usr/share/cassandra/lib/cassandra-driver-internal-only-2.1.1.post.zip /cassandra-driver-2.1.1.post/cassandra/cluster.py", line 2776, 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': 1}

This is how I set up multiple data centers:

> Use 2 nodes of each DC in the seed list
>Use org.apache.cassandra.locator.GossipingPropertyFileSnitch for the Snitch
>Specify a different DC name for the node in cassandra-rackdc.properties

This is to create a key space:

cqlsh:kairosdb> describe keyspace kairosdb;

CREATE KEYSPACE kairosdb WITH replication = {'class':'SimpleStrategy','replication_factor': '3'} AND durable_writes = true;

What do I think Can this problem be solved?

In your key space creation, you have the following syntax:

CREATE KEYSPACE kairosdb WITH replication = ('class':'SimpleStrategy','replication_factor': '3') AND durable_writes = true;

However, if you want to use replication across data centers (DC), you need Use NetworkTopologyStrategy, for example:

CREATE KEYSPACE kairosdb WITH replication = {'class':'NetworkTopologyStrategy','DC1': 3,'DC2': 3};

According to the following document link, “When you (or plan to have) a cluster deployed across multiple data centers, please use NetworkTopologyStrategy…”

http://www.datastax.com/ documentation/cassandra/2.0/cassandra/architecture/architectureDataDistributeReplication_c.html

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 496 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.