cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Hardouin <>
Subject Re: NoHostAvailableException coming up on our server
Date Wed, 13 Jul 2016 20:02:36 GMT
Put the driver logs in debug mode to see what's happen.Btw I am surprised by the few requests
by connections in your setup:        .setConnectionsPerHost(HostDistance.LOCAL, 20, 20)
         .setMaxRequestsPerConnection(HostDistance.LOCAL, 128) It looks like a protocol v2
settings (Cassandra 2.0) because it was limited to 128 requests per connection. You're using
C* 3.3 so the protocol v4.You can go up to 32K since protocol v3. As a first step I would
try to open only 2 connections with 16K in MaxRequestsPerConnection. Then try to fine tune.

    Le Mardi 12 juillet 2016 23h57, Abhinav Solan <> a écrit

 I am using 3.0.0 version over apache-cassandra-3.3 
On Tue, Jul 12, 2016 at 2:37 PM Riccardo Ferrari <> wrote:

What driver version are you using?
You can look at the LoggingRetryPolicy to have more meaningful messages in your logs.
On Tue, Jul 12, 2016 at 9:02 PM, Abhinav Solan <> wrote:

Thanks, JohnnyActually, they were running .. it went through a series of read and writes ..
and recovered after the error.Is there any settings I can specify in preparing the Session
at java client driver level, here are my current settings - PoolingOptions poolingOptions
= new PoolingOptions()
         .setConnectionsPerHost(HostDistance.LOCAL, 20, 20)
         .setMaxRequestsPerConnection(HostDistance.LOCAL, 128)
         .setNewConnectionThreshold(HostDistance.LOCAL, 100);

 Cluster.Builder builder = Cluster.builder()

On Tue, Jul 12, 2016 at 11:47 AM Johnny Miller <> wrote:

Abhinav - your getting that as the driver isn’t finding any hosts up for your query. You
probably need to check if all the nodes in your cluster are running.


On 12 Jul 2016, at 18:46, Abhinav Solan <> wrote:
Hi Everyone,
I am getting this error on our server, it comes and goes seems the connection drops a comes
back after a while -Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException:
All host(s) tried for query failed (tried: ****************:9042 (com.datastax.driver.core.exceptions.ConnectionException:
[****************] Pool is CLOSING))
	at com.datastax.driver.core.RequestHandler.reportNoMoreHosts(
	at com.datastax.driver.core.RequestHandler.access$1000(
	at com.datastax.driver.core.RequestHandler$SpeculativeExecution.sendRequest(
	at com.datastax.driver.core.RequestHandler.startNewExecution(
	at com.datastax.driver.core.RequestHandler.sendRequest(
	at com.datastax.driver.core.SessionManager.executeAsync( anyone
suggest me what can be done to handle this error ? 

View raw message