java - Elasticsearch 2.x sometimes throws NoNodeAvailableException -
i have same problem, doesn't happen, lets say:
- try connection. fail
- try connection. fail
- try connection. works...
sometime i'm lucky , works couple of weeks
i don't use spring-boot, jars , server same es-version (2.1.1. tried 2.4.0 too, , older es-version not solution). cluster name , port well. curl commands , sense working too
my elasticsearch.yml:
cluster.name sugar network.host: [my_host, _local_]
my java connection code:
settings settings = settings.settingsbuilder() .put("cluster.name", "sugar") .build(); inetaddress hostaddress = inetaddress.getbyname("my_host"); client client = transportclient.builder() .settings(settings) .build() .addtransportaddress(new inetsockettransportaddress(hostaddress, 9300)); // testing connection purpose client.admin() .cluster() .preparehealth() .execute(); .actionget();
we have docker-container qa, , works always!, our customers using windows, of them, , linux not alternative...
i don't know if firewall problem, elasticsearch bug, or ghost, rare
can me, please
thank you
Comments
Post a Comment