when i connect remote ES server,the client can run a few minutes,then the server disconnected and the client throws None of the ..nodes ara available.
i'm sure the CONF is right,the port ,the ip,the firewall,all CONF is right...
ES version:5.4.1
client: TransportClient
client create code:`Settings config = Settings.builder().put("client.transport.ping_timeout", "30s")
.build();
TransportClient tc = new PreBuiltTransportClient(config,Collections.EMPTY_SET);
try {
tc.addTransportAddresses(
new InetSocketTransportAddress(InetAddress.getByName("localhost"),9300)
// new InetSocketTransportAddress(InetAddress.getByName("192.168.1.165"),9300)
);
May be you have a network equipment in the middle who is doing disconnect when nothing is happening on the network between your application and elasticsearch?
Anyway, I'd encourage you using instead the REST Client as the Transport Client is going to be deprecated. It's a low level one for now but the high level version is coming soon.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.