Hi, I have a problem but no luck.
I use Elasticsearch v5.4.0 and v5.4.2 on Linux server.
Here is the situation, when my application start and construct using
TransportClient tc = new PrebuiltTransportClient()
At this moment, Elasticsearch is not started and NoNodeAvailableException was thrown, I think it should be expected(right?)
But later, when Elasticsearch server is available, in my application, I issue a query to Elasticsearch but also received same exception, unless I restart my application, the transport client will not work.
I try to surf the source code of TransportClient, it seems to me to check node available or not only happened when first time construct TransportClient? (am I right?)
The question:
- How to recover the client without restart application?
- Does this related to "sniff=true/false"? I set sniff enabled but no luck.
- Will there any setting can make TransportClient periodically re-check Elasticsearch server is available?
Thanks for you sharing and input.