sangshenghong created CASSANDRA-11002:
-----------------------------------------
Summary:
com.datastax.driver.core.exceptions.NoHostAvailableException
Key: CASSANDRA-11002
URL: https://issues.apache.org/jira/browse/CASSANDRA-11002
Project: Cassandra
Issue Type: Bug
Environment: Apache Cassandra 3.0.2 and 3.1.1
Reporter: sangshenghong
Fix For: 3.1.1
Attachments: error.png
I have created one issue CASSANDRA-10996, but the owner suggest I use datastax
java driver to get KeySpaceMetaData, so I downloaded this driver which version
is "3.0.0-rc1", I use the following code to connect :
Cluster cluster = Cluster.builder()
.addContactPoint("192.168.56.11")
.build();
KeyspaceMetadata keySpaceMetaData =
cluster.getMetadata().getKeyspace(this.keyspace);
But got the following exception:
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All
host(s) tried for query failed (tried: hwtest1.localdomain/192.168.56.11:9042
(com.datastax.driver.core.exceptions.TransportException:
[hwtest1.localdomain/192.168.56.11] Cannot connect))
at
com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:231)
at
com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1382)
at com.datastax.driver.core.Cluster.getMetadata(Cluster.java:393)
I also change the cassandra.yaml based on
https://github.com/datastax/java-driver/wiki/Connection-requirements
I also tried use Datastax DevCenter, it can connect to
hwtest1.localdomain/192.168.56.11 sussessfully.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)