3
votes

I've successfully set up a Cassandra cluster with 7 nodes. However, I can't get it to work for basic queries.

CREATE TABLE lgrsettings (
  siteid bigint,
  channel int,
  name text,
  offset float,
  scalefactor float,
  units text,
  PRIMARY KEY (siteid, channel)
)

insert into lgrsettings (siteid,channel,name,offset,scalefactor,units) values (999,1,'Flow',0.0,1.0,'m');

Then on one node:

select * from lgrsettings;

Request did not complete within rpc_timeout.

And on Another:

select * from lgrsettings;
Bad Request: unconfigured columnfamily lgrsettings

Even though the keyspace and column family shows up on all nodes.

Any ideas where I could start looking?

Alex

Interesting results. The node that handled the keyspace creation and insert shows:

Keyspace: testdata
    Read Count: 0
    Read Latency: NaN ms.
    Write Count: 2
    Write Latency: 0.304 ms.
    Pending Tasks: 0
            Column Family: lgrsettings
            SSTable count: 0
            Space used (live): 0
            Space used (total): 0
            Number of Keys (estimate): 0
            Memtable Columns Count: 10
            Memtable Data Size: 129
            Memtable Switch Count: 0
            Read Count: 0
            Read Latency: NaN ms.
            Write Count: 2
            Write Latency: NaN ms.
            Pending Tasks: 0
            Bloom Filter False Positives: 0
            Bloom Filter False Ratio: 0.00000
            Bloom Filter Space Used: 0
            Compacted row minimum size: 0
            Compacted row maximum size: 0
            Compacted row mean size: 0

            Column Family: datapoints
            SSTable count: 0
            Space used (live): 0
            Space used (total): 0
            Number of Keys (estimate): 0
            Memtable Columns Count: 0
            Memtable Data Size: 0
            Memtable Switch Count: 0
            Read Count: 0
            Read Latency: NaN ms.
            Write Count: 0
            Write Latency: NaN ms.
            Pending Tasks: 0
            Bloom Filter False Positives: 0
            Bloom Filter False Ratio: 0.00000
            Bloom Filter Space Used: 0
            Compacted row minimum size: 0
            Compacted row maximum size: 0
            Compacted row mean size: 0

Other nodes don't have this in the cfstats but do show it in DESCRIBE KEYSPACE testdata; in the CQL3 clients...

2
Which client you are using? - abhi
cqlsh and cassandra-sharp, both have the same behavior, timing out on one node and failing on the others. - axle_h
ok...Cassandra version? - abhi
Thanks for looking: it's apache-cassandra-1.2.3 - axle_h
can you let me know the output of nodetool cfstats? - abhi

2 Answers

5
votes

Request did not complete within rpc_timeout

Check your Cassandra logs to confirm if there is any issue - sometimes exceptions in Cassandra lead to timeouts on the client.

3
votes

In a comment, the OP said he found the cause of his problem:

I've managed to solve the issue. It was due to time sync between the nodes so I installed ntpd on all nodes, waited 5 minutes and tried again and I have a working cluster!