0

enter image description here

If I create a new project like this .

cluster = Cluster.builder().addContactPoint("127.0.0.1").build();

this code works.

But if I take all the jars from this project and migrate the jars to my own project .the code above doesn't work and it says:

13/07/01 16:27:16 ERROR core.Connection: [/127.0.0.1-1] No handler set for stream 1 (this is a bug, either of this driver or of Cassandra, you should report it)
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: [/127.0.0.1])
Raedwald
  • 46,613
  • 43
  • 151
  • 237
DunkOnly
  • 1,682
  • 4
  • 17
  • 39

1 Answers1

1

What version of Cassandra are you running? Have you enabled the native protocol in your cassandra.yaml?

In Cassandra 1.2.0-1.2.4 the native protocol was disabled by default, but in 1.2.5+ it's on by default.

See https://github.com/apache/cassandra/blob/cassandra-1.2.5/conf/cassandra.yaml#L335

That's the most common reason I've seen for not being able to connect with the driver.

Jeremy Hanna
  • 186
  • 2