Got NoNodeAvailableException exception

I got the following NoNodeAvailableException when I connect to my company network ES cluster by 10.14.192.199:9300 .

NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{05Fw3NppTOGkedTjluge4Q}{10.14.192.198}{10.14.192.198:9300}]
]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:347)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:245)
at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:363)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:62)
at

Step,
1,The ES version is 5.5, so added the following in pom.

org.elasticsearch.client
transport
5.5.0

2,Add the TransportAddress
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(address), port));

3, es config file

network.host: 10.14.192.198
http.port: 9200
transport.tcp.port: 9300

The issue is fixed after set the setting like below:
return Settings.builder().put("client.transport.sniff", true)
.put("cluster.name", clusterName).build();

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.