# Unable to connect Elastic Search Java Client to Elastic Search : 5.4.3

**URL:** <https://discuss.elastic.co/t/unable-to-connect-elastic-search-java-client-to-elastic-search-5-4-3/91890>\
**Category:** Elasticsearch\
**Created:** [July 5, 2017, 11:41am UTC](https://discuss.elastic.co/t/unable-to-connect-elastic-search-java-client-to-elastic-search-5-4-3/91890 "2017-07-05T11:41:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarvesh-D](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@Sarvesh-D](https://discuss.elastic.co/u/Sarvesh-D)\
**Post date:** [July 5, 2017, 11:41am UTC](https://discuss.elastic.co/t/unable-to-connect-elastic-search-java-client-to-elastic-search-5-4-3/91890/1 "2017-07-05T11:41:23Z")

</div>

I am having trouble connecting java client to elastic search 5.4.3. I am using below stack:

- dockerised version of elasticsearch:5.4.3

- elastic search client

```auto
<dependency>
		<groupId>org.elasticsearch.client</groupId>
		<artifactId>transport</artifactId>
		<version>5.4.3</version>
</dependency>

```

Below is response of [http://localhost:9200/\_nodes/http?pretty](http://localhost:9200/_nodes/http?pretty)

```auto
{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "cluster_name" : "elasticsearch",
  "nodes" : {
    "XU8oSxxJQFmrbwWHJTdokQ" : {
      "name" : "XU8oSxx",
      "transport_address" : "127.0.0.1:9300",
      "host" : "127.0.0.1",
      "ip" : "127.0.0.1",
      "version" : "5.4.3",
      "build_hash" : "eed30a8",
      "roles" : [
        "master",
        "data",
        "ingest"
      ],
      "attributes" : {
        "ml.enabled" : "true"
      },
      "http" : {
        "bound_address" : [
          "[::1]:9200",
          "127.0.0.1:9200",
          "172.19.0.2:9200"
        ],
        "publish_address" : "127.0.0.1:9200",
        "max_content_length_in_bytes" : 104857600
      }
    }
  }
}

```

Below is java-config:  
`TransportClient client = new PreBuiltTransportClient(settings).addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300));`

I am not getting any error while initialising the client. Whenever i perform a search query like

```auto
client.prepareSearch("nat-search").setTypes("csv")
		.setQuery(QueryBuilders.termQuery("obj_val", searchRequestDto.getKeyword())).get();

```

, i am getting below response:  
None of the configured nodes are available: [{#transport#-1}{52YhIsGTR76VlR9g9zsurA}{localhost}{127.0.0.1:9300}]

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 2, 2017, 11:41am UTC](https://discuss.elastic.co/t/unable-to-connect-elastic-search-java-client-to-elastic-search-5-4-3/91890/2 "2017-08-02T11:41:25Z")

</div>

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