# Transport Client - NoNodeAvailableException\[None of the configured nodes are available\]

**URL:** <https://discuss.elastic.co/t/transport-client-nonodeavailableexception-none-of-the-configured-nodes-are-available/92000>\
**Category:** Elasticsearch\
**Created:** [July 6, 2017, 1:31am UTC](https://discuss.elastic.co/t/transport-client-nonodeavailableexception-none-of-the-configured-nodes-are-available/92000 "2017-07-06T01:31:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yang\_Young](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_young/32/19809_2.png) [@Yang\_Young](https://discuss.elastic.co/u/Yang_Young)\
**Post date:** [July 6, 2017, 1:31am UTC](https://discuss.elastic.co/t/transport-client-nonodeavailableexception-none-of-the-configured-nodes-are-available/92000/1 "2017-07-06T01:31:00Z")

</div>

Dear Sir

I got the following error message when I tried to use transport client:

Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{zSavWRA4QBGzdYdox-h2Aw}{localhost}{127.0.0.1:9300}]]  
at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:348)  
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:246)  
at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59)  
at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:366)  
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)  
at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:62)  
at org.young.App.main(App.java:58)

I follow the document to write the following java code:

```
Settings settings = Settings.builder()
                .put("cluster.name", "elasticsearch")
                .put("client.transport.sniff", true)
                .build();
        TransportClient client = new PreBuiltTransportClient(settings)
               .addTransportAddress(new 
InetSocketTransportAddress(InetAddress.getByName("localhost"), 9300));

```

From the Kibana console GET \_nodes/\_all, I can see the nodes information in the end of attachment. I am sure the client java version and server side version are the same. Also, the port number, clustername, and host are correct.

Could you give me more hints to solve this issue?

Thank you so much.

Young  
{  
"\_nodes": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"cluster\_name": "elasticsearch",  
"nodes": {  
"tc29L00fSAWX4\_SdbvWbSQ": {  
"name": "tc29L00",  
"transport\_address": "127.0.0.1:9300",  
"host": "127.0.0.1",  
"ip": "127.0.0.1",  
"version": "5.4.3",  
"build\_hash": "eed30a8",  
"total\_indexing\_buffer": 213005107,  
"roles": [  
"master",  
"data",  
"ingest"  
],  
"settings": {  
"client": {  
"type": "node"  
},  
"cluster": {  
"name": "elasticsearch"  
},  
"http": {  
"host": "0.0.0.0",  
"type": {  
"default": "netty4"  
}  
},  
"node": {  
"name": "tc29L00"  
},  
"path": {  
"logs": "/usr/share/elasticsearch/logs",  
"home": "/usr/share/elasticsearch"  
},  
"transport": {  
"type": {  
"default": "netty4"  
}  
}  
},

---

<div class="post-metadata">

**Author:** ![Yang\_Young](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_young/32/19809_2.png) [@Yang\_Young](https://discuss.elastic.co/u/Yang_Young)\
**Post date:** [July 6, 2017, 8:53am UTC](https://discuss.elastic.co/t/transport-client-nonodeavailableexception-none-of-the-configured-nodes-are-available/92000/2 "2017-07-06T08:53:02Z")

</div>

Dear All

I solved the issue.  
I used the docker image to run the elastic search.

The command on this page: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)

```
docker run -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" docker.elastic.co/elasticsearch/elasticsearch:5.4.3

```

**-e "transport.host=127.0.0.1" did not work.**

I have to change the elasticsearch.yml, uncomment this line:

transport.host: 0.0.0.0

So that the transport client can correctly connect to port 9300.

---

<div class="post-metadata">

**Author:** ![Yang\_Young](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_young/32/19809_2.png) [@Yang\_Young](https://discuss.elastic.co/u/Yang_Young)\
**Post date:** [July 7, 2017, 3:35am UTC](https://discuss.elastic.co/t/transport-client-nonodeavailableexception-none-of-the-configured-nodes-are-available/92000/3 "2017-07-07T03:35:08Z")

</div>

Found another issue if I turned on

```
.put("client.transport.sniff", true)

```

It will cause the same error. I need to remove this line in my setting configuration.

---

<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 4, 2017, 3:35am UTC](https://discuss.elastic.co/t/transport-client-nonodeavailableexception-none-of-the-configured-nodes-are-available/92000/4 "2017-08-04T03:35:44Z")

</div>

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