# Java Error-\> NoNodeAvailableException: None of the configured nodes are available

**URL:** <https://discuss.elastic.co/t/java-error-nonodeavailableexception-none-of-the-configured-nodes-are-available/97750>\
**Category:** Elasticsearch\
**Created:** [August 21, 2017, 10:48am UTC](https://discuss.elastic.co/t/java-error-nonodeavailableexception-none-of-the-configured-nodes-are-available/97750 "2017-08-21T10:48:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NikhilJoshi2](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@NikhilJoshi2](https://discuss.elastic.co/u/NikhilJoshi2)\
**Post date:** [August 21, 2017, 10:48am UTC](https://discuss.elastic.co/t/java-error-nonodeavailableexception-none-of-the-configured-nodes-are-available/97750/1 "2017-08-21T10:48:56Z")

</div>

I am building up my TransportClient using correct cluster name:  
`Settings settings = Settings.builder().put("cluster.name", "myClusterName").build();`

Everything works perfectly fine when I deploy my Java code and run ElasticSearch on same Linux box. I use `localhost` when querying ElasticSearch.

When I try to connect ElasticSearch on Linux box using my local windows machine by using `LinuxBoxHostName`, it throws:  
`NoNodeAvailableException[None of the configured nodes are available`

ElasticSearch.yml file have below entries:  
`network.host: 127.0.0.1`  
`http.host: 127.0.0.1`

Please help me understand how to connect.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 21, 2017, 10:56am UTC](https://discuss.elastic.co/t/java-error-nonodeavailableexception-none-of-the-configured-nodes-are-available/97750/2 "2017-08-21T10:56:19Z")

</div>

If you bind Elasticsearch to localhost/127.0.0.1, then you cannot access the service over the network. You need to bind to an IP/interface that is reachable over the network.

---

<div class="post-metadata">

**Author:** ![NikhilJoshi2](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@NikhilJoshi2](https://discuss.elastic.co/u/NikhilJoshi2)\
**Post date:** [August 21, 2017, 11:09am UTC](https://discuss.elastic.co/t/java-error-nonodeavailableexception-none-of-the-configured-nodes-are-available/97750/3 "2017-08-21T11:09:39Z")

</div>

I had also tried with 0.0.0.0 but it didn't worked either. Anything I am  
missing?

---

<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:** [September 18, 2017, 11:09am UTC](https://discuss.elastic.co/t/java-error-nonodeavailableexception-none-of-the-configured-nodes-are-available/97750/4 "2017-09-18T11:09:39Z")

</div>

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