Elastic 2.* Java api

(Navneet Mathpal) #1


Is there some change happended in elastic java api in 2.* version ?
I was trying the below code in 1.7 and was working fine

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name","navneet").build();
TransportClient client = new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress("localhost", 9300));

But in elastic 2.1 it is throwing an error saying that :-

org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/]]

I think issue with the latest jars, any suggestion ?


(David Pilato) #2

A lot of changes yes. Not only in the java client.

But this should work I think unless you changed some elasticsearch.yml settings.

Actually, everything works fine for me locally.

(Navneet Mathpal) #3

I have not changed much in elastic.yml apart from node_name : Master-Node and Master : true
and I have only one master node running as of now..

(David Pilato) #4

what about the cluster name?

(Navneet Mathpal) #5

Yes , I had changed it to navneet

(David Pilato) #6

Did you change anything else?

Can you share the node logs?

(system) #7