# How to check if Transport Client has running queries for solve NoNodeAvailableException

**URL:** <https://discuss.elastic.co/t/how-to-check-if-transport-client-has-running-queries-for-solve-nonodeavailableexception/6923>\
**Category:** Elasticsearch\
**Created:** [March 6, 2012, 8:41pm UTC](https://discuss.elastic.co/t/how-to-check-if-transport-client-has-running-queries-for-solve-nonodeavailableexception/6923 "2012-03-06T20:41:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alichi](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@alichi](https://discuss.elastic.co/u/alichi)\
**Post date:** [March 6, 2012, 8:41pm UTC](https://discuss.elastic.co/t/how-to-check-if-transport-client-has-running-queries-for-solve-nonodeavailableexception/6923/1 "2012-03-06T20:41:29Z")

</div>

We have three nodes cluster on EC2 and in the pre-production phase we  
need to interface with the cluster from our local network.  
Unfortunately, we frequently get NoNodeAvailableException (we use JAVA  
API). I have dug the group and tried almost everything and yes I am  
sure we are using the same version of ES and at the moment we cannot  
upgrade from 0.18.7 to 0.19.0 (the latest version at the time of  
writing this down)

In order to fix this issue I want to create a service wrapper around  
transport client to do health check prior to any queries to the  
cluster. If the health check did not pass I have to reacquire the  
cluster. But I foresee a problem! What would happen to the in progress  
calls (the ones that were made and not returned prior to getting  
NoNodeAvailableException! -- this could happen if you have a web-app  
making tons of calls to ES through JAVA API)? Do they really matter? I  
mean if NoNodeAvailableException is caught they would also go bad (I  
am almost sure but need a nod for it)?

Please let me know what you think?  
Thanks,  
Ali

---

<div class="post-metadata">

**Author:** ![alichi](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@alichi](https://discuss.elastic.co/u/alichi)\
**Post date:** [March 6, 2012, 8:42pm UTC](https://discuss.elastic.co/t/how-to-check-if-transport-client-has-running-queries-for-solve-nonodeavailableexception/6923/2 "2012-03-06T20:42:37Z")

</div>

a type, I meant "to solve" not "for solve"

On Mar 6, 12:41 pm, Ali Loghmani [loghm...@gmail.com](mailto:loghm...@gmail.com) wrote:

> We have three nodes cluster on EC2 and in the pre-production phase we  
> need to interface with the cluster from our local network.  
> Unfortunately, we frequently get NoNodeAvailableException (we use JAVA  
> API). I have dug the group and tried almost everything and yes I am  
> sure we are using the same version of ES and at the moment we cannot  
> upgrade from 0.18.7 to 0.19.0 (the latest version at the time of  
> writing this down)
> 
> In order to fix this issue I want to create a service wrapper around  
> transport client to do health check prior to any queries to the  
> cluster. If the health check did not pass I have to reacquire the  
> cluster. But I foresee a problem! What would happen to the in progress  
> calls (the ones that were made and not returned prior to getting  
> NoNodeAvailableException! -- this could happen if you have a web-app  
> making tons of calls to ES through JAVA API)? Do they really matter? I  
> mean if NoNodeAvailableException is caught they would also go bad (I  
> am almost sure but need a nod for it)?
> 
> Please let me know what you think?  
> Thanks,  
> Ali

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 7, 2012, 11:19am UTC](https://discuss.elastic.co/t/how-to-check-if-transport-client-has-running-queries-for-solve-nonodeavailableexception/6923/3 "2012-03-07T11:19:45Z")

</div>

the most common case for NoNodeAvailable is the regular pinging that the transport client does fails to do it, so no nodes end up as the list of nodes that the transport client uses. If you will set client.transport (or org.elasticsearch.client.transport if running embedded) to TRACE, you will see the pinging effort and if it failed or not (and the reason for the failures). This might get us further into trying to understand why it happens.

On Tuesday, March 6, 2012 at 10:41 PM, Ali Loghmani wrote:

> We have three nodes cluster on EC2 and in the pre-production phase we  
> need to interface with the cluster from our local network.  
> Unfortunately, we frequently get NoNodeAvailableException (we use JAVA  
> API). I have dug the group and tried almost everything and yes I am  
> sure we are using the same version of ES and at the moment we cannot  
> upgrade from 0.18.7 to 0.19.0 (the latest version at the time of  
> writing this down)
> 
> In order to fix this issue I want to create a service wrapper around  
> transport client to do health check prior to any queries to the  
> cluster. If the health check did not pass I have to reacquire the  
> cluster. But I foresee a problem! What would happen to the in progress  
> calls (the ones that were made and not returned prior to getting  
> NoNodeAvailableException! -- this could happen if you have a web-app  
> making tons of calls to ES through JAVA API)? Do they really matter? I  
> mean if NoNodeAvailableException is caught they would also go bad (I  
> am almost sure but need a nod for it)?
> 
> Please let me know what you think?  
> Thanks,  
> Ali

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:36am UTC](https://discuss.elastic.co/t/how-to-check-if-transport-client-has-running-queries-for-solve-nonodeavailableexception/6923/4 "2017-07-06T03:36:55Z")

</div>


