I am running Elasticsearch out of port 9222, not 9200, but I have been unable to connect to it from my Java client program.
I changed my connection code to:
Settings settings = Settings.builder()
.put("cluster.name", CLUSTER_NAME).build();
TransportClient client = new PreBuiltTransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), ES_PORT));
/
where ES_Port is 9222,
But it continues to fail with
Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{DEI0dsf7Qdy0N_avSqKGfw}{localhost}{127.0.0.1:9222}]
But ES is operational on that port:
curl 'http://localhost:9222/?pretty'
{
"name" : "4FTDLkm",
"cluster_name" : "anton-expt1",
"cluster_uuid" : "BuuMEWMBQQCL915jpWc7Bg",
"version" : {
"number" : "5.3.2",
"build_hash" : "3068195",
"build_date" : "2017-04-24T16:15:59.481Z",
"build_snapshot" : false,
"lucene_version" : "6.4.2"
},
"tagline" : "You Know, for Search"
How can I get the api client to access the ES instance on that port?