Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra UnavailableException()

Tags:

cassandra

Exception in thread "main" UnavailableException()

at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:16485) at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:916) at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:890) at WordCountSetup.main(Unknown Source)

Hi, I got this error while running a job in cassandra. can anyone help me how to get those class files. thanks in advance..

like image 679
cassandra-developer Avatar asked Mar 23 '11 13:03

cassandra-developer


2 Answers

UnavailableException means "too many replicas are down."

like image 53
jbellis Avatar answered Sep 29 '22 12:09

jbellis


Usually this error comes when there is some issue with the replication setting of your key space. Few possibilities

  1. You have used network topology replication strategy but you do not have a cluster set up Then change the below: placement_strategy = 'NetworkTopologyStrategy' AND strategy_options={datacenter1:1}; to-> placement_strategy = 'SimpleStrategy' AND strategy_options={replication_factor:1};may
  2. You may have your data center name mismatched in the ring vs in your keyspace definition
  3. May be your ring is down.

For 2 and 3 use nodetool ring command to find out how your ring is set up. Then accordingly update the keyspace definition.

like image 43
Santanu Dey Avatar answered Sep 29 '22 12:09

Santanu Dey