Re: NoHostAvailableException

2016-11-21 Thread Vladimir Yudovin
Hi,



as I mentioned about rpc_address: 0.0.0.0 YAML says

it is allowed to specify 0.0.0.0 ... but that will break clients that rely on 
node auto-discovery.

Try set rpc_address: external_ip





Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Mon, 21 Nov 2016 11:52:31 -0500techpyaasa . 
techpya...@gmail.com wrote 




Hi Vladimir,



I have attached cassandra.yaml we have in our setup, please check once.

- do you have native port 9042 open in firewall ?
Yes, 9042 is opened on our firewall, checked with our team


- Can you connect to cluster with cqlsh?

Yes, Im able to connect cluster using cqlsh.



What else could be issue? :(








On Mon, Nov 21, 2016 at 7:23 PM, Vladimir Yudovin vla...@winguzone.com 
wrote:








Yaml in 2.0.17 says

# The address to bind the Thrift RPC service and native transport

# server -- clients connect here.

#

# Leaving this blank has the same effect it does for ListenAddress,

# (i.e. it will be based on the configured hostname of the node).

#

# Note that unlike ListenAddress above, it is allowed to specify 0.0.0.0

# here if you want to listen on all interfaces, but that will break clients 

# that rely on node auto-discovery.

#

# For security reasons, you should not expose this port to the internet.  
Firewall it if needed.

rpc_address: localhost

# port for Thrift to listen for clients on

rpc_port: 9160




So probably rpc_address: 0.0.0.0 is a problem. Also do you have native port 
9042 open in firewall (if there is one).

Can you connect to cluster with cqlsh?



Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.






 On Mon, 21 Nov 2016 08:26:54 -0500techpyaasa . 
techpya...@gmail.com wrote 




Sorry it was typo..

It is broadcast_address and not broadcast_rpc_address.
And also there is no such configuration in cass.yaml with broadcast_rpc_address 
in c*-2.0.17.
Very sorry once again.



This is configrn I have in cass.yaml



listen_address: [external IP]

# Address to broadcast to other Cassandra nodes

# Leaving this blank will set it to the same value as listen_address

# broadcast_address: 1.2.3.4 #It is commented, I have not made any changes for 
it

rpc_address: 0.0.0.0
rpc_port: 9160

Thanks
TechPyaasa







On Mon, Nov 21, 2016 at 6:48 PM, Vladimir Yudovin vla...@winguzone.com 
wrote:








Not broadcast_address, but broadcast_rpc_address  (you gave this 
example:rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4)





Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.






 On Mon, 21 Nov 2016 08:14:38 -0500techpyaasa . 
techpya...@gmail.com wrote 




Hi Vladimir,



I have not modified anything for broadcasr_address, I left as it was..


# Leaving this blank will set it to the same value as listen_address
# broadcast_address: 1.2.3.4



So the  comment above says "Leaving this blank will set it to the same value as 
listen_address" , so it shud set as listen_address and I have set 
listen_address as its external IPs for all nodes..

So I guess that should not be a problem... :(



What else could be the issue...??  :( :(





On Mon, Nov 21, 2016 at 4:21 PM, Vladimir Yudovin vla...@winguzone.com 
wrote:








Try to set broadcast_rpc_address on each node to its real external IP address.



Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Mon, 21 Nov 2016 05:47:00 -0500techpyaasa . 
techpya...@gmail.com wrote 




Following exception intermittently thrown by datastax java driver though all 
nodes are up.(Happening for both read  write queries)

"Exception com.datastax.driver.core.exceptions.NoHostAvailableException: All 
host(s) tried for query failed (no host was tried) at 
com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
 at 
com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
 at 
com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:214)
 at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) 
at"

Using c*-2.0.17 , datastax java driver - cassandra-driver-core-2.1.8.jar.

In cassandra.yaml following were set 
rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4

Have anyone faced such issue ? What could be the reason and fix for it?

Thanks in advance


Techpyaasa.





























Re: NoHostAvailableException

2016-11-21 Thread techpyaasa .
Hi Vladimir,

I have attached cassandra.yaml we have in our setup, please check once.
- do you have native port 9042 open in firewall ?
Yes, 9042 is opened on our firewall, checked with our team

- Can you connect to cluster with cqlsh?
Yes, Im able to connect cluster using cqlsh.

What else could be issue? :(



On Mon, Nov 21, 2016 at 7:23 PM, Vladimir Yudovin 
wrote:

> Yaml in 2.0.17 says
>
> # The address to bind the Thrift RPC service and native transport
> # server -- clients connect here.
> #
> # Leaving this blank has the same effect it does for ListenAddress,
> # (i.e. it will be based on the configured hostname of the node).
> #
> # Note that unlike ListenAddress above, it is allowed to specify 0.0.0.0
> # here if you want to listen on all interfaces, but that will break
> clients
> # that rely on node auto-discovery.
> #
> # For security reasons, you should not expose this port to the internet.
> Firewall it if needed.
> rpc_address: localhost
> # port for Thrift to listen for clients on
> rpc_port: 9160
>
>
> So probably *rpc_address: 0.0.0.0* is a problem. Also do you have native
> port 9042 open in firewall (if there is one).
> Can you connect to cluster with cqlsh?
>
> Best regards, Vladimir Yudovin,
>
> *Winguzone  - Hosted Cloud
> CassandraLaunch your cluster in minutes.*
>
>
>  On Mon, 21 Nov 2016 08:26:54 -0500*techpyaasa .
> >* wrote 
>
> Sorry it was typo..
> It is *broadcast_address and not **broadcast_**rpc**_address.*
> And also there is no such configuration in cass.yaml with 
> *broadcast_rpc_address
> *in c*-2.0.17.
> Very sorry once again.
>
> This is configrn I have in cass.yaml
>
>
> *listen_address: [external IP]*
> *# Address to broadcast to other Cassandra nodes*
> *# Leaving this blank will set it to the same value as listen_address*
>
>
>
> *# broadcast_address: 1.2.3.4 #It is commented, I have not made any
> changes for itrpc_address: 0.0.0.0*
> *rpc_port: 9160*
> Thanks
> TechPyaasa
>
>
>
> On Mon, Nov 21, 2016 at 6:48 PM, Vladimir Yudovin 
> wrote:
>
>
> Not *broadcast_address*, but *broadcast_rpc_address*  (you gave this
> example:rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4)
>
>
> Best regards, Vladimir Yudovin,
>
> *Winguzone  - Hosted Cloud
> CassandraLaunch your cluster in minutes.*
>
>
>  On Mon, 21 Nov 2016 08:14:38 -0500*techpyaasa .
> >* wrote 
>
> Hi Vladimir,
>
> I have not modified anything for broadcasr_address, I left as it was..
>
> *# Leaving this blank will set it to the same value as listen_address*
> *# broadcast_address: 1.2.3.4*
>
> So the  comment above says "*Leaving this blank will set it to the same
> value as listen_address" *, so it shud set as listen_address and I have
> set listen_address as its external IPs for all nodes..
> So I guess that should not be a problem... :(
>
> What else could be the issue...??  :( :(
>
> On Mon, Nov 21, 2016 at 4:21 PM, Vladimir Yudovin 
> wrote:
>
>
> Try to set *broadcast_rpc_address* on each node to its real external IP
> address.
>
> Best regards, Vladimir Yudovin,
>
> *Winguzone  - Hosted Cloud
> CassandraLaunch your cluster in minutes.*
>
>
>  On Mon, 21 Nov 2016 05:47:00 -0500*techpyaasa .
> >* wrote 
>
> Following exception intermittently thrown by datastax java driver though
> all nodes are up.(Happening for both read & write queries)
>
> *"Exception com.datastax.driver.core.exceptions.NoHostAvailableException:
> All host(s) tried for query failed (no host was tried) at
> com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
> at
> com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
> at
> com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:214)
> at
> com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)
> at"*
>
> Using c*-2.0.17 , datastax java driver - cassandra-driver-core-2.1.8.jar.
>
> In cassandra.yaml following were set
> rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4
>
> Have anyone faced such issue ? What could be the reason and fix for it?
>
> Thanks in advance
>
>
> Techpyaasa.
>
>
>
>
>


cassandra.yaml
Description: application/yaml


Re: NoHostAvailableException

2016-11-21 Thread Vladimir Yudovin
Yaml in 2.0.17 says

# The address to bind the Thrift RPC service and native transport

# server -- clients connect here.

#

# Leaving this blank has the same effect it does for ListenAddress,

# (i.e. it will be based on the configured hostname of the node).

#

# Note that unlike ListenAddress above, it is allowed to specify 0.0.0.0

# here if you want to listen on all interfaces, but that will break clients 

# that rely on node auto-discovery.

#

# For security reasons, you should not expose this port to the internet.  
Firewall it if needed.

rpc_address: localhost

# port for Thrift to listen for clients on

rpc_port: 9160




So probably rpc_address: 0.0.0.0 is a problem. Also do you have native port 
9042 open in firewall (if there is one).

Can you connect to cluster with cqlsh?



Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Mon, 21 Nov 2016 08:26:54 -0500techpyaasa . 
techpya...@gmail.com wrote 




Sorry it was typo..

It is broadcast_address and not broadcast_rpc_address.
And also there is no such configuration in cass.yaml with broadcast_rpc_address 
in c*-2.0.17.
Very sorry once again.



This is configrn I have in cass.yaml



listen_address: [external IP]

# Address to broadcast to other Cassandra nodes

# Leaving this blank will set it to the same value as listen_address

# broadcast_address: 1.2.3.4 #It is commented, I have not made any changes for 
it

rpc_address: 0.0.0.0
rpc_port: 9160

Thanks
TechPyaasa







On Mon, Nov 21, 2016 at 6:48 PM, Vladimir Yudovin vla...@winguzone.com 
wrote:








Not broadcast_address, but broadcast_rpc_address  (you gave this 
example:rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4)





Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.






 On Mon, 21 Nov 2016 08:14:38 -0500techpyaasa . 
techpya...@gmail.com wrote 




Hi Vladimir,



I have not modified anything for broadcasr_address, I left as it was..


# Leaving this blank will set it to the same value as listen_address
# broadcast_address: 1.2.3.4



So the  comment above says "Leaving this blank will set it to the same value as 
listen_address" , so it shud set as listen_address and I have set 
listen_address as its external IPs for all nodes..

So I guess that should not be a problem... :(



What else could be the issue...??  :( :(





On Mon, Nov 21, 2016 at 4:21 PM, Vladimir Yudovin vla...@winguzone.com 
wrote:








Try to set broadcast_rpc_address on each node to its real external IP address.



Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Mon, 21 Nov 2016 05:47:00 -0500techpyaasa . 
techpya...@gmail.com wrote 




Following exception intermittently thrown by datastax java driver though all 
nodes are up.(Happening for both read  write queries)

"Exception com.datastax.driver.core.exceptions.NoHostAvailableException: All 
host(s) tried for query failed (no host was tried) at 
com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
 at 
com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
 at 
com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:214)
 at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) 
at"

Using c*-2.0.17 , datastax java driver - cassandra-driver-core-2.1.8.jar.

In cassandra.yaml following were set 
rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4

Have anyone faced such issue ? What could be the reason and fix for it?

Thanks in advance


Techpyaasa.






















Re: NoHostAvailableException

2016-11-21 Thread techpyaasa .
Sorry it was typo..
It is *broadcast_address and not **broadcast_*rpc*_address.*
And also there is no such configuration in cass.yaml with
*broadcast_rpc_address
*in c*-2.0.17.
Very sorry once again.

This is configrn I have in cass.yaml



*listen_address: [external IP]*
*# Address to broadcast to other Cassandra nodes*
*# Leaving this blank will set it to the same value as listen_address*



*# broadcast_address: 1.2.3.4 #It is commented, I have not made any changes
for itrpc_address: 0.0.0.0*
*rpc_port: 9160*
Thanks
TechPyaasa




On Mon, Nov 21, 2016 at 6:48 PM, Vladimir Yudovin 
wrote:

> Not *broadcast_address*, but *broadcast_rpc_address*  (you gave this
> example:rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4)
>
>
> Best regards, Vladimir Yudovin,
>
> *Winguzone  - Hosted Cloud
> CassandraLaunch your cluster in minutes.*
>
>
>  On Mon, 21 Nov 2016 08:14:38 -0500*techpyaasa .
> >* wrote 
>
> Hi Vladimir,
>
> I have not modified anything for broadcasr_address, I left as it was..
>
> *# Leaving this blank will set it to the same value as listen_address*
> *# broadcast_address: 1.2.3.4*
>
> So the  comment above says "*Leaving this blank will set it to the same
> value as listen_address" *, so it shud set as listen_address and I have
> set listen_address as its external IPs for all nodes..
> So I guess that should not be a problem... :(
>
> What else could be the issue...??  :( :(
>
> On Mon, Nov 21, 2016 at 4:21 PM, Vladimir Yudovin 
> wrote:
>
>
> Try to set *broadcast_rpc_address* on each node to its real external IP
> address.
>
> Best regards, Vladimir Yudovin,
>
> *Winguzone  - Hosted Cloud
> CassandraLaunch your cluster in minutes.*
>
>
>  On Mon, 21 Nov 2016 05:47:00 -0500*techpyaasa .
> >* wrote 
>
> Following exception intermittently thrown by datastax java driver though
> all nodes are up.(Happening for both read & write queries)
>
> *"Exception com.datastax.driver.core.exceptions.NoHostAvailableException:
> All host(s) tried for query failed (no host was tried) at
> com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
> at
> com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
> at
> com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:214)
> at
> com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)
> at"*
>
> Using c*-2.0.17 , datastax java driver - cassandra-driver-core-2.1.8.jar.
>
> In cassandra.yaml following were set
> rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4
>
> Have anyone faced such issue ? What could be the reason and fix for it?
>
> Thanks in advance
>
>
> Techpyaasa.
>
>
>
>


Re: NoHostAvailableException

2016-11-21 Thread Vladimir Yudovin
Not broadcast_address, but broadcast_rpc_address  (you gave this 
example:rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4)





Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Mon, 21 Nov 2016 08:14:38 -0500techpyaasa . 
techpya...@gmail.com wrote 




Hi Vladimir,



I have not modified anything for broadcasr_address, I left as it was..


# Leaving this blank will set it to the same value as listen_address
# broadcast_address: 1.2.3.4



So the  comment above says "Leaving this blank will set it to the same value as 
listen_address" , so it shud set as listen_address and I have set 
listen_address as its external IPs for all nodes..

So I guess that should not be a problem... :(



What else could be the issue...??  :( :(





On Mon, Nov 21, 2016 at 4:21 PM, Vladimir Yudovin vla...@winguzone.com 
wrote:








Try to set broadcast_rpc_address on each node to its real external IP address.



Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Mon, 21 Nov 2016 05:47:00 -0500techpyaasa . 
techpya...@gmail.com wrote 




Following exception intermittently thrown by datastax java driver though all 
nodes are up.(Happening for both read  write queries)

"Exception com.datastax.driver.core.exceptions.NoHostAvailableException: All 
host(s) tried for query failed (no host was tried) at 
com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
 at 
com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
 at 
com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:214)
 at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) 
at"

Using c*-2.0.17 , datastax java driver - cassandra-driver-core-2.1.8.jar.

In cassandra.yaml following were set 
rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4

Have anyone faced such issue ? What could be the reason and fix for it?

Thanks in advance


Techpyaasa.















Re: NoHostAvailableException

2016-11-21 Thread techpyaasa .
Hi Vladimir,

I have not modified anything for broadcasr_address, I left as it was..

*# Leaving this blank will set it to the same value as listen_address*
*# broadcast_address: 1.2.3.4*

So the  comment above says "*Leaving this blank will set it to the same
value as listen_address" *, so it shud set as listen_address and I have set
listen_address as its external IPs for all nodes..
So I guess that should not be a problem... :(

What else could be the issue...??  :( :(

On Mon, Nov 21, 2016 at 4:21 PM, Vladimir Yudovin 
wrote:

> Try to set *broadcast_rpc_address* on each node to its real external IP
> address.
>
> Best regards, Vladimir Yudovin,
>
> *Winguzone  - Hosted Cloud
> CassandraLaunch your cluster in minutes.*
>
>
>  On Mon, 21 Nov 2016 05:47:00 -0500*techpyaasa .
> >* wrote 
>
> Following exception intermittently thrown by datastax java driver though
> all nodes are up.(Happening for both read & write queries)
>
> *"Exception com.datastax.driver.core.exceptions.NoHostAvailableException:
> All host(s) tried for query failed (no host was tried) at
> com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
> at
> com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
> at
> com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:214)
> at
> com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52)
> at"*
>
> Using c*-2.0.17 , datastax java driver - cassandra-driver-core-2.1.8.jar.
>
> In cassandra.yaml following were set
> rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4
>
> Have anyone faced such issue ? What could be the reason and fix for it?
>
> Thanks in advance
>
>
> Techpyaasa.
>
>
>


Re: NoHostAvailableException

2016-11-21 Thread Vladimir Yudovin
Try to set broadcast_rpc_address on each node to its real external IP address.



Best regards, Vladimir Yudovin, 

Winguzone - Hosted Cloud Cassandra
Launch your cluster in minutes.





 On Mon, 21 Nov 2016 05:47:00 -0500techpyaasa . 
techpya...@gmail.com wrote 




Following exception intermittently thrown by datastax java driver though all 
nodes are up.(Happening for both read  write queries)

"Exception com.datastax.driver.core.exceptions.NoHostAvailableException: All 
host(s) tried for query failed (no host was tried) at 
com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
 at 
com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
 at 
com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:214)
 at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:52) 
at"

Using c*-2.0.17 , datastax java driver - cassandra-driver-core-2.1.8.jar.

In cassandra.yaml following were set 
rpc_address: 0.0.0.0  , broadcast_rpc_address: 1.2.3.4

Have anyone faced such issue ? What could be the reason and fix for it?

Thanks in advance


Techpyaasa.








Re: NoHostAvailableException coming up on our server

2016-07-13 Thread Abhinav Solan
Thanks a lot for suggestion Romain, I have done the setup to see the driver
logs, but haven't seen that error again.
Also thanks for the MaxRequestPerConnection tip, I will change it to 32K.

Regards,
Abhinav

On Wed, Jul 13, 2016 at 1:02 PM Romain Hardouin  wrote:

> 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  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.
>
> best,
>
> On Tue, Jul 12, 2016 at 9:02 PM, Abhinav Solan 
> wrote:
>
> Thanks, Johnny
> Actually, 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 
> 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  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
>
>
>
>
>
>


Re: NoHostAvailableException coming up on our server

2016-07-13 Thread Romain Hardouin
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  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.
best,
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()
 .addContactPoints(cp)
 .withPoolingOptions(poolingOptions)
 .withProtocolVersion(ProtocolVersion.NEWEST_SUPPORTED)
 .withPort(port);

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.
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  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







  

Re: NoHostAvailableException coming up on our server

2016-07-12 Thread Abhinav Solan
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.
>
> best,
>
> On Tue, Jul 12, 2016 at 9:02 PM, Abhinav Solan 
> wrote:
>
>> Thanks, Johnny
>> Actually, 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 
>> 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  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
>>>
>>>
>>>
>


Re: NoHostAvailableException coming up on our server

2016-07-12 Thread Riccardo Ferrari
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 
wrote:

> Thanks, Johnny
> Actually, 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 
> 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  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
>>
>>
>>


Re: NoHostAvailableException coming up on our server

2016-07-12 Thread Abhinav Solan
Thanks, Johnny
Actually, 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 
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  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
>
>
>


Re: NoHostAvailableException coming up on our server

2016-07-12 Thread Johnny Miller
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  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



Re: NoHostAvailableException/TransportException

2013-10-31 Thread Sylvain Lebresne
cqlsh uses thrift, the java driver uses the native protocol. Thirft is on
port 9160 by default, the native protocol is on port 9042 by default. Try
connecting on port 9042 with the driver instead (which is the driver
default really).

--
Sylvain


On Thu, Oct 31, 2013 at 6:01 PM, Les Hartzman lhartz...@gmail.com wrote:

 I'm running Cassandra 2.0.1 on Ubuntu in a VirtualBox VM. I'm using the
 Datastax Java driver, 1.0.4, and am trying to connect to 127.0.0.1, port
 9160.

 I'm getting the NoHostAvailable exception and on the TransportException it
 states [127.0.0.1] Channel has been closed.

 The server is running. I can bring up cqlsh and select the keyspace and
 query the table without any problem. It shows that it is connected to
  localhost:9160.

 The cassandra.yaml file in /etc/cassandra has 'start_native_transport:
 true'.

 I did notice on startup  the message JNA not found. Native methods will
 be disabled. Not sure if this means anything or not.

 Ideas?

 Thanks.

 Les






Re: NoHostAvailableException/TransportException

2013-10-31 Thread Les Hartzman
Thank you! That was it.

Les


On Thu, Oct 31, 2013 at 10:06 AM, Sylvain Lebresne sylv...@datastax.comwrote:

 cqlsh uses thrift, the java driver uses the native protocol. Thirft is on
 port 9160 by default, the native protocol is on port 9042 by default. Try
 connecting on port 9042 with the driver instead (which is the driver
 default really).

 --
 Sylvain


 On Thu, Oct 31, 2013 at 6:01 PM, Les Hartzman lhartz...@gmail.com wrote:

 I'm running Cassandra 2.0.1 on Ubuntu in a VirtualBox VM. I'm using the
 Datastax Java driver, 1.0.4, and am trying to connect to 127.0.0.1, port
 9160.

 I'm getting the NoHostAvailable exception and on the TransportException
 it states [127.0.0.1] Channel has been closed.

 The server is running. I can bring up cqlsh and select the keyspace and
 query the table without any problem. It shows that it is connected to
  localhost:9160.

 The cassandra.yaml file in /etc/cassandra has 'start_native_transport:
 true'.

 I did notice on startup  the message JNA not found. Native methods will
 be disabled. Not sure if this means anything or not.

 Ideas?

 Thanks.

 Les







Re: NoHostAvailableException/TransportException

2013-10-31 Thread Robert Coli
On Thu, Oct 31, 2013 at 10:01 AM, Les Hartzman lhartz...@gmail.com wrote:

 I did notice on startup  the message JNA not found. Native methods will
 be disabled. Not sure if this means anything or not.


While not relevant to the problem you were having, in general one really
does want to have JNA available when running Cassandra.

=Rob