Piero Ottuzzi created CASSANDRA-7905:
----------------------------------------
Summary: Not enough replica available for query at consistency ONE
(1 required but only 0 alive)
Key: CASSANDRA-7905
URL: https://issues.apache.org/jira/browse/CASSANDRA-7905
Project: Cassandra
Issue Type: Bug
Components: Core
Environment: Windows 7 32 bit - Oracle JDK 1.8
Reporter: Piero Ottuzzi
Fix For: 2.1 rc6
Hi,
I'm toying around with Cassandra and I setup a local 3 node cluster:
nodetool -u cassandra -pw cassandra -h node01 status
Starting NodeTool
Note: Ownership information does not include topology; for complete
information, specify a keyspace
Datacenter: DC1
================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID
Rack
UN 192.168.118.254 33,38 KB 2 0,1%
ab527444-6ea5-4948-8002-3f92ecc2093f RAC1
UN 192.168.118.1 49,84 KB 256 50,1%
d707d7d1-642b-46b2-8c98-17b02a947088 RAC1
UN 192.168.118.2 4,09 KB 256 49,8%
a6531780-44ce-4eea-ad9d-1c83b7782d43 RAC1
All nodes are part of DC1/RAC1.
Then I created a new keyspace:
CREATE KEYSPACE IF NOT EXISTS loose_data WITH REPLICATION = { 'class' :
'NetworkTopologyStrategy', 'dc1' : 1 } AND durable_writes = false;
And finally when I try an insert in this keyspace using Datastax Java Driver
2.1 I get:
com.datastax.driver.core.exceptions.UnavailableException: Not enough replica
available for query at consistency ONE (1 required but only 0 alive)
As you can see above the cluster is running well and the 3 nodes know each
other.
Inspecting keyspace definition I see:
cqlsh> SELECT * FROM system.schema_keyspaces;
keyspace_name | durable_writes | strategy_class
| strategy_options
---------------+----------------+------------------------------------------------------+----------------------------
loose_data | False |
org.apache.cassandra.locator.NetworkTopologyStrategy |
{"dc1":"1"}
So, to my noob eyes, everything looks right... what am I missing?
Thanks in advance
Sincerely
Piero
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)