No node available exception after node shutdown

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'

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
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.
To view this discussion on the web visit 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.