Java Client conncetion

Hi, i am new with Elasticsearch and i am trying to execute a simple search query.

     Settings settings = Settings.settingsBuilder()
    .put("", "elasticsearch").build();
    Client client = TransportClient.builder().settings(settings).build()
    .addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("", 9300)));

    SearchResponse response = client.prepareSearch("logstash-2016.04.22")

and Here the error logs:

            avr. 22, 2016 6:41:45 PM org.elasticsearch.transport.netty.NettyTransport exceptionCaught
            AVERTISSEMENT: [Ereshkigal] exception caught on transport layer [[id: 0x8e5bd9b6, /
             => /]], closing connection

-elasticsearch is running on the port 9300
-cluster name is elasticsearch
-the index is "logstash-2016.04.22"
-i am calling this code in a spring MVC controller

I am heared that it's a version problem isue so i am asking here.

Thank you in advence.

Which versions on both side?

I am using java jre 1.8:

and elasticsearch-2.3.0

Elasticsearch server is 2.3.0. Which client version? How does your pom look like?

1 Like


if that's what you mean with client

I just added Client configuration to my pom.xml


Thank you !

I have no idea. May be you have a bigger stacktrace? More logs?