-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hector HUnavailableException in Cassandra cluster #610
Comments
I change the host config just seeds like below, the app runs ok. bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator" I am confused. |
What was the config before your change? I have to provide the config with
|
The first congif is below, but it can't run. then I change to below, it runs well. the difference between the two configs is that the first config includes all nodes but the second config just includes the seed nodes. |
You may want to check the output of nodetool ring Seems odd the it doesn't run when specifying all the nodes
|
The topology is like below in my Cassandra Cluster.
192.168.0.193=DC1:RAC1(seed)
192.168.0.194=DC1:RAC1
192.168.0.188=DC2:RAC1(seed)
192.168.0.197=DC2:RAC1
The keyspace of Cassandra Cluster is :
Strategy Class: org.apache.cassandra.locator.SimpleStrategy
Strategy Options: None
Replication Factor: 1
In my app, I configure CassandraHost in Spring is:
bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator"
constructor-arg value="192.168.0.188:9160,192.168.0.193:9160,192.168.0.194:9160,192.168.0.197:9160"
The consistencyLevel of keyspace and column family is default value(QUORUM).
After started my app the exception HUnavailableException occurs:
me.prettyprint.hector.api.exceptions.HUnavailableException: : May not be enough replicas present to handle consistency level.
at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:59) ~[hector-core-1.1-2.jar:na]
at me.prettyprint.cassandra.model.CqlQuery$1.execute(CqlQuery.java:142) ~[hector-core-1.1-2.jar:na]
at me.prettyprint.cassandra.model.CqlQuery$1.execute(CqlQuery.java:106) ~[hector-core-1.1-2.jar:na]
at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:104) ~[hector-core-1.1-2.jar:na]
at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:258) ~[hector-core-1.1-2.jar:na]
at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecuteOperation(ExecutingKeyspace.java:113) ~[hector-core-1.1-2.jar:na]
at me.prettyprint.cassandra.model.CqlQuery.execute(CqlQuery.java:105) ~[hector-core-1.1-2.jar:na]
.....
Caused by: org.apache.cassandra.thrift.UnavailableException: null
at org.apache.cassandra.thrift.Cassandra$execute_cql_query_result.read(Cassandra.java:32755) ~[cassandra-thrift-1.1.0.jar:1.1.0]
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) ~[libthrift-0.7.0.jar:0.7.0]
at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql_query(Cassandra.java:1368) ~[cassandra-thrift-1.1.0.jar:1.1.0]
at org.apache.cassandra.thrift.Cassandra$Client.execute_cql_query(Cassandra.java:1354) ~[cassandra-thrift-1.1.0.jar:1.1.0]
at me.prettyprint.cassandra.model.CqlQuery$1.execute(CqlQuery.java:118) ~[hector-core-1.1-2.jar:na]
... 19 common frames omitted
Is it my configuration error or something?
The text was updated successfully, but these errors were encountered: