NoNodeAvailableException - 5.4.0

Hi - We are using elasticsearch 5.4.0 (both server / client)

Below the code and Exception - (Verified cluster name matches with

some of the elasticsearch.yml network properties -
network.host: 0.0.0.0
#transport.tcp.port: 9303
......
discovery.zen.ping.unicast.hosts: ["11.126.84.225:9300","11.126.84.225:9301"]

Client Code:-

	ArrayList<Class<? extends Plugin>> arrayList = new ArrayList<Class<? extends Plugin>>();
	Settings.Builder builder = Settings.builder();
	builder.put("cluster.name", "?????");
	// builder.put("client.transport.ignore_cluster_name", "true");
	builder.put("client.transport.sniff", "true");
	Settings settings = builder.build();
	TransportClient transport = new PreBuiltTransportClient(settings, arrayList);
	for (InetSocketTransportAddress transportAddress : serverAddresses) {
		transport.addTransportAddress(transportAddress);
	}
	client = transport;
	SearchResponse response = client.prepareSearch("iapi-log", "logs").setFrom(0).setSize(60).get();

Exception -
Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{40Baz09tQamMjPMrBtNqWw}{ln001xserk0001}{11.126.84.225:9300}]]
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:348)
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:246)
at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:366)
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)
..............

transport.tcp.port=9303 is actually commented in yml file

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