Cassandra cannot connect to host in testkit
See original GitHub issueWhen using an embedded Cassandra in test in lagom 1.5.0-M3, I get logged errors about failure to connect to a host. My tests still pass, but the errors look scary. 😃
Error:
[error] c.d.d.c.ControlConnection - [Control connection] Cannot connect to any host, scheduling retry in 1000 milliseconds
[error] c.d.d.c.ControlConnection - [Control connection] Cannot connect to any host, scheduling retry in 1000 milliseconds
[error] c.d.d.c.ControlConnection - [Control connection] Cannot connect to any host, scheduling retry in 2000 milliseconds
[error] c.d.d.c.ControlConnection - [Control connection] Cannot connect to any host, scheduling retry in 2000 milliseconds
[error] a.c.s.PersistentShardCoordinator - Failed to persist event type [akka.cluster.sharding.ShardCoordinator$Internal$ShardRegionRegistered] with sequence number [1] for persistenceId [/sharding/TicketEntityCoordinator].
java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried)
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:531)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:492)
at akka.persistence.cassandra.package$ListenableFutureConverter$$anon$2.$anonfun$run$2(package.scala:25)
at scala.util.Try$.apply(Try.scala:209)
at akka.persistence.cassandra.package$ListenableFutureConverter$$anon$2.run(package.scala:25)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (no host was tried)
at com.datastax.driver.core.RequestHandler.reportNoMoreHosts(RequestHandler.java:265)
at com.datastax.driver.core.RequestHandler.access$1200(RequestHandler.java:62)
at com.datastax.driver.core.RequestHandler$SpeculativeExecution.findNextHostAndQuery(RequestHandler.java:357)
at com.datastax.driver.core.RequestHandler.startNewExecution(RequestHandler.java:138)
at com.datastax.driver.core.RequestHandler.sendRequest(RequestHandler.java:120)
at com.datastax.driver.core.SessionManager.execute(SessionManager.java:700)
at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:144)
at akka.persistence.cassandra.session.scaladsl.CassandraSession.$anonfun$executeWrite$1(CassandraSession.scala:264)
at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:303)
at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
[error] c.d.d.c.ControlConnection - [Control connection] Cannot connect to any host, scheduling retry in 4000 milliseconds
[error] c.d.d.c.ControlConnection - [Control connection] Cannot connect to any host, scheduling retry in 4000 milliseconds
The tests that report this are in ticket/ticket-impl/src/test/scala/com/github/erip/ticket/impl/TicketServiceSpec.scala
.
Reproducer: https://github.com/erip/ticketing-service after switching plugin version from 1.4.8
to 1.5.0-M3
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Entity testing raising exception trying to connect to Cassandra
I'm using Lagom 1.6.0-M5. I defined an Entity Spec test which uses the PersistentEntityTestDriver which allows to run the test without ...
Read more >Cannot connect to Cassandra during tests - Google Groups
We have a situation where we are using cassandra-unit for our integration tests with spring-data-cassandra. Our integration tests work great ...
Read more >Cassandra No host exception and Unable to connect to any ...
we have a 12 node cassandra cluster spread across 2 datacenter with 6 node in each datacenter. When trying to login to cqlsh...
Read more >Cannot connect to DSE from Python app - Datastax Community
x server hosted DataStax Cassandra 6.8. I am able to successfully connect locally inside the Centos Shell and the nodetool status shows the ......
Read more >cassandra.yaml file configuration
The file size limit to store hints for an unreachable host, in mebibytes. ... The partitioner can NOT be changed without reloading all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm this still happens in 1.5.0.
When the test was running in 1.6.1, The problem happened.