Open nivance opened 11 years ago
I change the host config just seeds like below, the app runs ok.
bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator" constructor-arg value="192.168.0.188:9160,192.168.0.193:9160"
I am confused.
What was the config before your change? I have to provide the config with some nodes so it can connect to the cluster and discover the rest of the ring. On Apr 11, 2013 1:59 AM, "nivance" notifications@github.com wrote:
I change the host config just seeds like below, the app runs ok.
bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator" constructor-arg value="192.168.0.188:9160,192.168.0.193:9160"
I am confused.
— Reply to this email directly or view it on GitHubhttps://github.com/hector-client/hector/issues/610#issuecomment-16223596 .
The first congif is below, but it can't run. 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"
then I change to below, it runs well. bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator" constructor-arg value="192.168.0.188:9160,192.168.0.193:9160"
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 On Apr 12, 2013 11:23 PM, "nivance" notifications@github.com wrote:
The first congif is below, but it can't run. 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"
then I change to below, it runs well. bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator" constructor-arg value="192.168.0.188:9160,192.168.0.193:9160"
the difference between the two configs is that the first config includes all nodes but the second config just includes the seed nodes.
— Reply to this email directly or view it on GitHubhttps://github.com/hector-client/hector/issues/610#issuecomment-16328365 .
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?