None of configured nodes available


(Basanagouda) #1

Continuing the discussion from Elastic 5.4.0 TransportClient does not work:
i am getting the below exception
Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{HB7QXPrEQ36kXUE1KwFSEg}{localhost}{127.0.0.1:9300}]]
nothing changed in .yml file(default values as when we install elasticsearch 5.4.1)
Below is the snippet of my code:

Settings settings = Settings.builder()
.put("cluster.name", "elasticsearch")
.put("client.transport.sniff", true)
.put("node.name", "x9VxGqT")
.put("transport.tcp.port", 9300)
.put("transport.ping_schedule","600s").build();
TransportClient client = new PreBuiltTransportClient(settings);
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300));

        final ClusterHealthResponse res = client.admin().cluster().health(new ClusterHealthRequest()).actionGet();
        System.out.println(res.getClusterName());

(system) #2

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