# NoNodeAvailableException\[None of the configured nodes are available exception

**URL:** <https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713>\
**Category:** Elasticsearch\
**Created:** [July 4, 2017, 5:50am UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713 "2017-07-04T05:50:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subhasish\_Sahu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/subhasish_sahu/32/19708_2.png) [@Subhasish\_Sahu](https://discuss.elastic.co/u/Subhasish_Sahu)\
**Post date:** [July 4, 2017, 5:50am UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/1 "2017-07-04T05:50:14Z")

</div>

I am using ES 5.4.2 and Java 1.8 and getting below error while connecting to local ES server.

Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{cv2EOOhCQ3OeqIFvyfrtYQ}{127.0.0.1}{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.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1256)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)  
at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)

## Code:

```
     Settings settings = Settings.builder()
        .put("client.transport.nodes_sampler_interval", "5s")
        .put("client.transport.sniff", false)
        .put("transport.tcp.compress", true)
        .put("cluster.name", clusterName)
        .put("request.headers.X-Found-Cluster", "${cluster.name}")
        .build();

 TransportClient client = new PreBuiltTransportClient(settings);
 client.addTransportAddress(new InetSocketTransportAddress(address, port));
ActionFuture<ClusterHealthResponse> healthFuture = 
client.admin().cluster().health(Requests.clusterHealthRequest());
            ClusterHealthResponse healthResponse = healthFuture.get(5, TimeUnit.SECONDS);
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 4, 2017, 7:37am UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/2 "2017-07-04T07:37:24Z")

</div>

I think you should read this: [https://www.elastic.co/guide/en/x-pack/current/java-clients.html](https://www.elastic.co/guide/en/x-pack/current/java-clients.html)

---

<div class="post-metadata">

**Author:** ![Subhasish\_Sahu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/subhasish_sahu/32/19708_2.png) [@Subhasish\_Sahu](https://discuss.elastic.co/u/Subhasish_Sahu)\
**Post date:** [July 4, 2017, 10:46am UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/3 "2017-07-04T10:46:40Z")

</div>

But im using it in local..do i still need to code the Xpack way ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 4, 2017, 2:22pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/4 "2017-07-04T14:22:10Z")

</div>

I was confused by:

```auto
        .put("request.headers.X-Found-Cluster", "${cluster.name}")

```

Which means to me that you are trying to connect to a cloud cluster.

If local, then it looks good but I'd remove all the Settings but `cluster.name`.

---

<div class="post-metadata">

**Author:** ![Subhasish\_Sahu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/subhasish_sahu/32/19708_2.png) [@Subhasish\_Sahu](https://discuss.elastic.co/u/Subhasish_Sahu)\
**Post date:** [July 4, 2017, 3:23pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/5 "2017-07-04T15:23:02Z")

</div>

yml file content : xpack.security.enabled: false

Java Code:

```
     Settings settings =Settings.builder()
	    		.put("client.transport.sniff",true)
	    		.put("cluster.name", "my-application").build();

       TransportClient client = new PreBuiltTransportClient(settings)
        .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300));

       CreateIndexRequestBuilder createIndexRequestBuilder = client.admin().indices().prepareCreate("subu");
       createIndexRequestBuilder.execute().actionGet();
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 4, 2017, 4:01pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/6 "2017-07-04T16:01:35Z")

</div>

Can you remove `.put("client.transport.sniff",true)`?

---

<div class="post-metadata">

**Author:** ![Subhasish\_Sahu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/subhasish_sahu/32/19708_2.png) [@Subhasish\_Sahu](https://discuss.elastic.co/u/Subhasish_Sahu)\
**Post date:** [July 4, 2017, 4:08pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/7 "2017-07-04T16:08:52Z")

</div>

tried that also still not working

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 4, 2017, 4:37pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/8 "2017-07-04T16:37:34Z")

</div>

Can you share your full elasticsearch logs?

---

<div class="post-metadata">

**Author:** ![Subhasish\_Sahu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/subhasish_sahu/32/19708_2.png) [@Subhasish\_Sahu](https://discuss.elastic.co/u/Subhasish_Sahu)\
**Post date:** [July 4, 2017, 5:12pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/9 "2017-07-04T17:12:40Z")

</div>

## Logs:

```auto
[2017-07-04T22:39:02,873][INFO][o.e.n.Node] [] initializing ...
[2017-07-04T22:39:02,992][INFO][o.e.e.NodeEnvironment] [-3-DQ-T] using [1] data paths, mounts [[os (C:)]], net usable_space [4.6gb], net total_space [238.1gb], spins? [unknown], types [NTFS]
[2017-07-04T22:39:02,993][INFO][o.e.e.NodeEnvironment] [-3-DQ-T] heap size [990.7mb], compressed ordinary object pointers [true]
[2017-07-04T22:39:03,642][INFO][o.e.n.Node] node name [-3-DQ-T] derived from node ID [-3-DQ-TFTgqQiQ5-wWGA9g]; set [node.name] to override
[2017-07-04T22:39:03,643][INFO][o.e.n.Node] version[5.4.2], pid[6448], build[929b078/2017-06-15T02:29:28.122Z], OS[Windows 7/6.1/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0/25.0-b70]
[2017-07-04T22:39:03,644][INFO][o.e.n.Node] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+DisableExplicitGC, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -XX:+HeapDumpOnOutOfMemoryError, -Delasticsearch, -Des.path.home=C:\Subhasish\elasticsearch-5.4.2\elasticsearch-5.4.2]
[2017-07-04T22:39:06,753][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [aggs-matrix-stats]
[2017-07-04T22:39:06,753][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [ingest-common]
[2017-07-04T22:39:06,753][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [lang-expression]
[2017-07-04T22:39:06,755][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [lang-groovy]
[2017-07-04T22:39:06,757][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [lang-mustache]
[2017-07-04T22:39:06,760][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [lang-painless]
[2017-07-04T22:39:06,762][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [percolator]
[2017-07-04T22:39:06,764][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [reindex]
[2017-07-04T22:39:06,765][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [transport-netty3]
[2017-07-04T22:39:06,767][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded module [transport-netty4]
[2017-07-04T22:39:06,770][INFO][o.e.p.PluginsService] [-3-DQ-T] loaded plugin [x-pack]
[2017-07-04T22:39:11,471][INFO][o.e.x.m.j.p.l.CppLogMessageHandler] [controller/7924] [Main.cc@128] controller (64 bit): Version 5.4.2 (Build 0986144d2d42c8) Copyright (c) 2017 Elasticsearch BV
[2017-07-04T22:39:11,496][INFO][o.e.d.DiscoveryModule] [-3-DQ-T] using discovery type [zen]
[2017-07-04T22:39:13,206][INFO][o.e.n.Node] initialized
[2017-07-04T22:39:13,208][INFO][o.e.n.Node] [-3-DQ-T] starting ...
[2017-07-04T22:39:14,659][INFO][o.e.t.TransportService] [-3-DQ-T] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2017-07-04T22:39:17,753][INFO][o.e.c.s.ClusterService] [-3-DQ-T] new_master {-3-DQ-T}{-3-DQ-TFTgqQiQ5-wWGA9g}{L6WNXu81Qj6LgFWc2giifw}{127.0.0.1}{127.0.0.1:9300}{ml.enabled=true}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-07-04T22:39:18,932][INFO][o.e.l.LicenseService] [-3-DQ-T] license [f23be8bf-5d09-477b-975c-b72400f3d6ec] mode [trial] - valid
[2017-07-04T22:39:19,024][INFO][o.e.g.GatewayService] [-3-DQ-T] recovered [13] indices into cluster_state
[2017-07-04T22:39:23,421][INFO][o.e.c.r.a.AllocationService] [-3-DQ-T] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[test][1]] ...]).
[2017-07-04T22:39:24,921][INFO][o.e.h.n.Netty4HttpServerTransport] [-3-DQ-T] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2017-07-04T22:39:24,925][INFO][o.e.n.Node] [-3-DQ-T] started
[2017-07-04T22:39:47,815][WARN][o.e.c.r.a.DiskThresholdMonitor] [-3-DQ-T] high disk watermark [90%] exceeded on [-3-DQ-TFTgqQiQ5-wWGA9g][-3-DQ-T][C:\Subhasish\elasticsearch-5.4.2\elasticsearch-5.4.2\data\nodes\0] free: 4.5gb[1.9%], shards will be relocated away from this node
[2017-07-04T22:39:47,817][INFO][o.e.c.r.a.DiskThresholdMonitor] [-3-DQ-T] rerouting shards: [high disk watermark exceeded on one or more nodes]
[2017-07-04T22:40:17,911][WARN][o.e.c.r.a.DiskThresholdMonitor] [-3-DQ-T] high disk watermark [90%] exceeded on [-3-DQ-TFTgqQiQ5-wWGA9g][-3-DQ-T][C:\Subhasish\elasticsearch-5.4.2\elasticsearch-5.4.2\data\nodes\0] free: 7.5gb[3.1%], shards will be relocated away from this node
[2017-07-04T22:40:48,010][WARN][o.e.c.r.a.DiskThresholdMonitor] [-3-DQ-T] high disk watermark [90%] exceeded on [-3-DQ-TFTgqQiQ5-wWGA9g][-3-DQ-T][C:\Subhasish\elasticsearch-5.4.2\elasticsearch-5.4.2\data\nodes\0] free: 6.5gb[2.7%], shards will be relocated away from this node
[2017-07-04T22:40:48,011][INFO][o.e.c.r.a.DiskThresholdMonitor] [-3-DQ-T] rerouting shards: [high disk watermark exceeded on one or more nodes]
[2017-07-04T22:41:18,134][WARN][o.e.c.r.a.DiskThresholdMonitor] [-3-DQ-T] high disk watermark [90%] exceeded on [-3-DQ-TFTgqQiQ5-wWGA9g][-3-DQ-T][C:\Subhasish\elasticsearch-5.4.2\elasticsearch-5.4.2\data\nodes\0] free: 6.5gb[2.7%], shards will be relocated away from this node

```

## Eclipse Console Logs:

```auto
   log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{RAs6MMTNS3eaGim9-6jAnA}{127.0.0.1}{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.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1256)
	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80)
	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
	at com.subu.els.demo.ElasticSearchClient.main(ElasticSearchClient.java:57)

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 10, 2017, 3:19pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/10 "2017-07-10T15:19:46Z")

</div>

Nothing looks very bad.

I mean that I'm not expecting such a `None of the configured nodes are available`.

That said:

```
client.admin().indices().prepareCreate("subu").get();

```

Might be problematic on your cluster because you are running low on disk space:

```auto
[2017-07-04T22:39:47,815][WARN][o.e.c.r.a.DiskThresholdMonitor] [-3-DQ-T] high disk watermark [90%] exceeded on [-3-DQ-TFTgqQiQ5-wWGA9g][-3-DQ-T][C:\Subhasish\elasticsearch-5.4.2\elasticsearch-5.4.2\data\nodes\0] free: 4.5gb[1.9%], shards will be relocated away from this node

```

---

<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 7, 2017, 3:19pm UTC](https://discuss.elastic.co/t/nonodeavailableexception-none-of-the-configured-nodes-are-available-exception/91713/11 "2017-08-07T15:19:51Z")

</div>

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