Hi,
I created a 4 node DSE 2.2 cluster (4 Virtual nodes running centos 5.8). Created a keyspace with strategy_class = 'NetworkTopologyStrategy' and in that keyspace created table called emp.
However when I query form tbale I get the error "Unable to complete request: one or more nodes were unavailable."
Any idea what is going on .. apprerciate your help.
Thanks
Contents of cassandra-topology.properties
# Cassandra Node IP=Data Center:Rack
192.168.1.226=DC1:RAC1
192.168.1.228=DC2:RAC1
192.168.1.227=DC1:RAC1
192.168.1.229=DC2:RAC1
# default for unknown nodes
default=DC1:RAC1
[root@cas1 cassandra]# nodetool -h localhost ring
Address DC Rack Status State Load Effective-Ownership Token
127605887595351923798765477786913079296
192.168.1.226 DC1 RAC1 Up Normal 26.35 KB 0.00% 0
192.168.1.228 DC2 RAC1 Up Normal 26.35 KB 0.00% 42535295865117307932921825928971026432
192.168.1.227 DC1 RAC1 Up Normal 26.57 KB 0.00% 85070591730234615865843651857942052864
192.168.1.229 DC2 RAC1 Up Normal 26.35 KB 0.00% 127605887595351923798765477786913079296
cqlsh> describe cluster
Cluster: DemoCluster
Partitioner: RandomPartitioner
Snitch: PropertyFileSnitch
cqlsh> select * from system.schema_keyspaces;
keyspace | durable_writes | name | strategy_class | strategy_options
--------------+----------------+--------------+------------------------------------------------------+-----------------------
testkeyspace | True | testkeyspace | org.apache.cassandra.locator.NetworkTopologyStrategy | {"dc2":"2","dc1":"2"}
cqlsh> use testkeyspace
... ;
cqlsh:testkeyspace> describe keyspace;
CREATE KEYSPACE testkeyspace WITH strategy_class = 'NetworkTopologyStrategy'
AND strategy_options:dc2 = '2'
AND strategy_options:dc1 = '2';
USE testkeyspace;
CREATE TABLE emp (
empid int,
deptid int,
first_name text,
last_name text,
PRIMARY KEY (empid, deptid)
) WITH
comment='' AND
caching='KEYS_ONLY' AND
read_repair_chance=0.100000 AND
gc_grace_seconds=864000 AND
replicate_on_write='true' AND
compaction_strategy_class='SizeTieredCompactionStrategy' AND
compression_parameters:sstable_compression='SnappyCompressor';
cqlsh:testkeyspace> select * from emp;
Unable to complete request: one or more nodes were unavailable.
cqlsh:testkeyspace>
Here is the output from system.log file (with DEBUG on) from the node where I ran the select query:
DEBUG [MigrationStage:1] 2012-11-05 16:31:53,403 ColumnFamilyStore.java (line 227) Starting CFS emp
DEBUG [MigrationStage:1] 2012-11-05 16:31:53,403 IntervalNode.java (line 45) Creating IntervalNode from []
DEBUG [MigrationStage:1] 2012-11-05 16:31:53,404 SchemaCheckVerbHandler.java (line 36) Received schema check request.
DEBUG [InternalResponseStage:3] 2012-11-05 16:31:53,404 ResponseVerbHandler.java (line 44) Processing response on a callback from 497@/192.168.1.226
DEBUG [InternalResponseStage:4] 2012-11-05 16:31:53,407 ResponseVerbHandler.java (line 44) Processing response on a callback from 500@/192.168.1.229
DEBUG [InternalResponseStage:4] 2012-11-05 16:31:53,408 StorageProxy.java (line 958) Received schema check response from 192.168.1.229
DEBUG [InternalResponseStage:4] 2012-11-05 16:31:53,408 ResponseVerbHandler.java (line 44) Processing response on a callback from 499@/192.168.1.228
DEBUG [InternalResponseStage:4] 2012-11-05 16:31:53,408 StorageProxy.java (line 958) Received schema check response from 192.168.1.228
DEBUG [InternalResponseStage:3] 2012-11-05 16:31:53,408 StorageProxy.java (line 958) Received schema check response from 192.168.1.226
DEBUG [InternalResponseStage:4] 2012-11-05 16:31:53,409 ResponseVerbHandler.java (line 44) Processing response on a callback from 498@/192.168.1.227
DEBUG [InternalResponseStage:4] 2012-11-05 16:31:53,409 StorageProxy.java (line 958) Received schema check response from 192.168.1.227
DEBUG [Thrift:1] 2012-11-05 16:31:53,409 StorageProxy.java (line 989) My version is 3b601b6b-b0a7-3752-b604-9d1f5e6e30f9
DEBUG [Thrift:1] 2012-11-05 16:31:53,410 StorageProxy.java (line 1019) Schemas are in agreement.
DEBUG [Thrift:1] 2012-11-05 16:31:57,478 CassandraServer.java (line 1227) execute_cql_query
DEBUG [Thrift:1] 2012-11-05 16:31:57,484 StorageProxy.java (line 839) Command/ConsistencyLevel is RangeSliceCommand{keyspace='testkeyspace', column_family='emp', super_column=null, predicate=SlicePredicate(slice_range:SliceRange(start:, finish:, reversed:false, count:-1)), range=[min(-1),min(-1)], row_filter =[], maxResults=20000, maxIsColumns=true}/ONE
DEBUG [Thrift:1] 2012-11-05 16:31:57,487 StorageProxy.java (line 1070) restricted ranges for query [min(-1),min(-1)] are [[min(-1),max(0)], (max(0),max(42535295865117307932921825928971026432)], (max(42535295865117307932921825928971026432),max(85070591730234615865843651857942052864)], (max(85070591730234615865843651857942052864),max(127605887595351923798765477786913079296)], (max(127605887595351923798765477786913079296),min(-1)]]
DEBUG [Thrift:1] 2012-11-05 16:31:57,488 NetworkTopologyStrategy.java (line 125) endpoints in datacenter dc2 for token 0
DEBUG [Thrift:1] 2012-11-05 16:31:57,488 NetworkTopologyStrategy.java (line 125) endpoints in datacenter dc1 for token 0
DEBUG [Thrift:1] 2012-11-05 16:31:57,496 ReadCallback.java (line 79) Blockfor is 1; setting up requests to
DEBUG [Thrift:1] 2012-11-05 16:31:57,497 ReadCallback.java (line 232) Live nodes do not satisfy ConsistencyLevel (1 required)
DEBUG [ScheduledTasks:1] 2012-11-05 16:32:38,756 LoadBroadcaster.java (line 86) Disseminating load info ...
