# No node available exception after node shutdown

**URL:** <https://discuss.elastic.co/t/no-node-available-exception-after-node-shutdown/19621>\
**Category:** Elasticsearch\
**Created:** [September 4, 2014, 12:09pm UTC](https://discuss.elastic.co/t/no-node-available-exception-after-node-shutdown/19621 "2014-09-04T12:09:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emanuel\_Buzek](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@Emanuel\_Buzek](https://discuss.elastic.co/u/Emanuel_Buzek)\
**Post date:** [September 4, 2014, 12:09pm UTC](https://discuss.elastic.co/t/no-node-available-exception-after-node-shutdown/19621/1 "2014-09-04T12:09:41Z")

</div>

Hi folks,  
we have a two node cluster and we connect to it using the TransportClient  
from java by adding two hosts, i.e.

((TransportClient) client).addTransportAddress(new  
InetSocketTransportAddress("elastic1", port));  
((TransportClient) client).addTransportAddress(new  
InetSocketTransportAddress("elastic2",  
port));  
The load-balancing \*kind of \*works, i.e. when I take down one host, the  
cluster keeps working because we have index.number\_of\_replicas set to 1.

However, there is a little glitch (~2secs) just after a node shuts down. We  
have lots of indexing/search requests going to the cluster all the time,  
and when I shutdown one server, our system throws \*No node available  
\*exceptions  
(and recovers after ~2secs).

I thought that shutting down the node using the API by calling

curl -XPOST '[http://localhost:9200/\_cluster/nodes/\_local/\_shutdown](http://localhost:9200/_cluster/nodes/_local/_shutdown)'

would fix this issue at least when I take the node down purposefully for  
maintenance, but it's the same.

Is there any way to fix this, or do we just have to expect that sometimes  
the cluster might not be available and retry?

Thanks,  
emanuel

--  
Emanuel Buzek  
Software Engineer, ROKE.cz [http://www.roke.cz](http://www.roke.cz)  
tel: +420 776 54 26 26

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL1sZ7%3DmdN35Ex%2Bckc\_LEhUPLjOVaUS8eB2kP4us-tsBFWxhtA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL1sZ7%3DmdN35Ex%2Bckc_LEhUPLjOVaUS8eB2kP4us-tsBFWxhtA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:04am UTC](https://discuss.elastic.co/t/no-node-available-exception-after-node-shutdown/19621/2 "2017-07-06T01:04:23Z")

</div>


