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

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -