com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/0:0:0:0:0:0:0:1:9142 (com.datastax.driver.core.exceptions.TransportException: [localhost/0:0:0:0:0:0:0:1] Cannot connect), localhost/127.0.0.1:9142 (com.datastax.driver.core.exceptions.TransportException: [localhost/127.0.0.1] Cannot connect))

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by jerrypaytm
, 1 year ago
All host(s) tried for query failed (tried: localhost/0:0:0:0:0:0:0:1:9142 (com.datastax.driver.core.exceptions.TransportException: [localhost/0:0:0:0:0:0:0:1] Cannot connect), localhost/127.0.0.1:9142 (com.datastax.driver.core.exceptions.TransportException: [localhost/127.0.0.1] Cannot connect))
via Stack Overflow by Vladimir Matveev
, 1 year ago
All host(s) tried for query failed (tried: cassandra/172.18.0.2:9042 (com.datastax.driver.core.exceptions.TransportException: [cassandra/172.18.0.2:9042] Cannot connect))
via GitHub by warroyo
, 1 year ago
All host(s) tried for query failed (tried: /172.17.0.51:9042 (com.datastax.driver.core.TransportException: [/172.17.0.51:9042] Cannot connect))
via Stack Overflow by sam1977
, 2 years ago
All host(s) tried for query failed (tried: /128.199.98.201:9042 (com.datastax.driver.core.exceptions.OperationTimedOutException: [/128.199.98.201] Operation timed out))
via Stack Overflow by Artem
, 1 year ago
All host(s) tried for query failed (tried: localhost/127.0.0.1:9142 (com.datastax.driver.core.exceptions.TransportException: [localhost/127.0.0.1] Cannot connect))
via GitHub by lossyrob
, 1 year ago
All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.exceptions.TransportException: [/127.0.0.1] Cannot connect))
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/0:0:0:0:0:0:0:1:9142 (com.datastax.driver.core.exceptions.TransportException: [localhost/0:0:0:0:0:0:0:1] Cannot connect), localhost/127.0.0.1:9142 (com.datastax.driver.core.exceptions.TransportException: [localhost/127.0.0.1] Cannot connect))
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:233)
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:79)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1424)
at com.datastax.driver.core.Cluster.init(Cluster.java:163)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:334)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:309)
at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1$$anonfun$2.apply(DefaultSessionProvider.scala:58)
at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1$$anonfun$2.apply(DefaultSessionProvider.scala:58)
at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
at scala.concurrent.package$.blocking(package.scala:123)
at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:57)
at com.websudos.phantom.connectors.DefaultSessionProvider$$anonfun$1.apply(DefaultSessionProvider.scala:56)
at scala.util.Try$.apply(Try.scala:192)
at com.websudos.phantom.connectors.DefaultSessionProvider.createSession(DefaultSessionProvider.scala:56)
at com.websudos.phantom.connectors.DefaultSessionProvider.(DefaultSessionProvider.scala:68)
at com.websudos.phantom.connectors.KeySpaceDef.(Keyspace.scala:85)
at com.websudos.phantom.connectors.KeySpaceBuilder.keySpace(KeySpaceBuilder.scala:53)

Users with the same issue

3 times, 2 months ago
4 times, 3 months ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago
Samebug visitor profile picture
Unknown user
Once, 3 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.