Achyuth
Achyuth

Reputation: 41

Apache Cassandra. UnavailableException While Trying to insert a record

I am very new to Cassandra, and some how configured it. I was following This Link . Everything was fine. But in the end when I am trying to insert a record, it gives me the following exception. Today since afternoon I am trying to fix this. Googled a lot, but could not reach anywhere.

Any help on this will be greatly appretiated.

[default@DEMO] set Users[1234][name] = scott;
null
UnavailableException()
        at org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:16077)
        at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
        at org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:801)
        at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:785)
        at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:909)
        at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:222)
        at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:201)
        at org.apache.cassandra.cli.CliMain.main(CliMain.java:328)
[default@DEMO]

Thank you Achyuth

Upvotes: 2

Views: 1951

Answers (1)

BenOmaha
BenOmaha

Reputation: 21

this is old one, I want to share my experience.

I had same issue when I was setting the qa environment. Every thing configured fine: including : cassandra-topology.properties. But the nodetool ring display the unknown DC value for all nodes since the default is set UNKNOWN. That told me that the cassandra-topology.properties is not right in some way. After tried several things still no luck, I decided to create my own cassandra-topology.properties file and re-type every thing with vi, then it starts fine.

So if you have issue, run nodetool ring first to see if the DC set is what it should be.

Upvotes: 2

Related Questions