Elastic 2.* Java api


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 ?


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.

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..

what about the cluster name?

Yes , I had changed it to navneet

Did you change anything else?

Can you share the node logs?