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.
Best,
Romain
Le Mardi 12 juillet 2016 23h57, Abhinav Solan <[email protected]> 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 <[email protected]> wrote:
What driver version are you using?
You can look at the LoggingRetryPolicy to have more meaningful messages in your
logs.
best,
On Tue, Jul 12, 2016 at 9:02 PM, Abhinav Solan <[email protected]> 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()
.addContactPoints(cp)
.withPoolingOptions(poolingOptions)
.withProtocolVersion(ProtocolVersion.NEWEST_SUPPORTED)
.withPort(port);
On Tue, Jul 12, 2016 at 11:47 AM Johnny Miller <[email protected]>
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.
See:
http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/NoHostAvailableException.html
Johnny
On 12 Jul 2016, at 18:46, Abhinav Solan <[email protected]> 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(RequestHandler.java:218)
at
com.datastax.driver.core.RequestHandler.access$1000(RequestHandler.java:43)
at
com.datastax.driver.core.RequestHandler$SpeculativeExecution.sendRequest(RequestHandler.java:284)
at
com.datastax.driver.core.RequestHandler.startNewExecution(RequestHandler.java:115)
at
com.datastax.driver.core.RequestHandler.sendRequest(RequestHandler.java:91)
at
com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:129)Can
anyone suggest me what can be done to handle this error ?
Thanks,Abhinav