# Unicast help

**URL:** https://discuss.elastic.co/t/unicast-help/4102
**Category:** Elasticsearch
**Created:** [March 15, 2011, 7:00pm UTC](https://discuss.elastic.co/t/unicast-help/4102 "2011-03-15T19:00:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)
#### Post date: [March 15, 2011, 7:00pm UTC](https://discuss.elastic.co/t/unicast-help/4102/1 "2011-03-15T19:00:15Z")

</div>

Hi,

I need some help in configuring unicast in 15.0:

This is my YAML config on the "master" (data=true) node:

cluster:  
name: CMTLocal

node:  
data: true

http:  
enabled: true

discovery:  
zen:  
ping:  
multicast:  
enabled: false  
unicast:  
hosts: 166.15.121.116[9300],166.15.121.116[9301],  
166.15.121.116[9302]

When Starting this node I get:

bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/  
166.15.121.116:9300]}

From my client node I do this:

```
	Settings settings = ImmutableSettings.settingsBuilder()
		.put("index.number_of_shards", 1)
		.put("index.number_of_replicas", 1)
		.put("discovery.zen.ping.multicast.enabled", false)
		.put("discovery.zen.ping.unicast.enabled", true)

```

.put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
166.15.121.116[9301],166.15.121.116[9302]")  
.build();

```
	Node hostNode = NodeBuilder.nodeBuilder()
		.loadConfigSettings(false)
		.clusterName("CMTLocal")
		.client(true)
		.settings(settings)
		.node()
		.start();

```

Which gives me:

bound\_address {inet[/0.0.0.0:9301]}, publish\_address {inet[/  
166.15.121.116:9301]}  
waited for 30s and no initial state was set by the discovery

Then the client fails to find the master.

Best Regards,

David.

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [March 15, 2011, 10:55pm UTC](https://discuss.elastic.co/t/unicast-help/4102/2 "2011-03-15T22:55:50Z")

</div>

Hey,

The configuration looks good (though all formatting is lost when you paste it in an email). Can you turn on TRACE logging for the discovery module? If its on the server side, just add discovery: TRACE in the logging.yml file. If its on the Java client side, make sure to turn on TRACE logging for org.elasticsearch.discovery. And _gist_ the log output?  
On Tuesday, March 15, 2011 at 9:00 PM, davrob2 wrote:

> Hi,
> 
> I need some help in configuring unicast in 15.0:
> 
> This is my YAML config on the "master" (data=true) node:
> 
> cluster:  
> name: CMTLocal
> 
> node:  
> data: true
> 
> http:  
> enabled: true
> 
> discovery:  
> zen:  
> ping:  
> multicast:  
> enabled: false  
> unicast:  
> hosts: 166.15.121.116[9300],166.15.121.116[9301],  
> 166.15.121.116[9302]
> 
> When Starting this node I get:
> 
> bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/  
> 166.15.121.116:9300]}
> 
> From my client node I do this:
> 
> Settings settings = ImmutableSettings.settingsBuilder()  
> .put("index.number\_of\_shards", 1)  
> .put("index.number\_of\_replicas", 1)  
> .put("discovery.zen.ping.multicast.enabled", false)  
> .put("discovery.zen.ping.unicast.enabled", true)  
> .put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
> 166.15.121.116[9301],166.15.121.116[9302]")  
> .build();
> 
> Node hostNode = NodeBuilder.nodeBuilder()  
> .loadConfigSettings(false)  
> .clusterName("CMTLocal")  
> .client(true)  
> .settings(settings)  
> .node()  
> .start();
> 
> Which gives me:
> 
> bound\_address {inet[/0.0.0.0:9301]}, publish\_address {inet[/  
> 166.15.121.116:9301]}  
> waited for 30s and no initial state was set by the discovery
> 
> Then the client fails to find the master.
> 
> Best Regards,
> 
> David.

---

<div class="post-metadata">

### Author: ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)
#### Post date: [March 16, 2011, 12:10pm UTC](https://discuss.elastic.co/t/unicast-help/4102/3 "2011-03-16T12:10:18Z")

</div>

Hi,

These are my logs and config:

Master (starts first):\<nabble\_a href="master.log"\>master.log\</nabble\_a\>  
Client (Starts later):\<nabble\_a href="client.log"\>client.log\</nabble\_a\>  
Java:\<nabble\_a href="init-client-java.txt"\>init-client-java.txt\</nabble\_a\>  
elasticsearch.yml:\<nabble\_a href="elasticsearch.yml"\>elasticsearch.yml\</nabble\_a\>

David.

---

<div class="post-metadata">

### Author: ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)
#### Post date: [March 16, 2011, 4:17pm UTC](https://discuss.elastic.co/t/unicast-help/4102/4 "2011-03-16T16:17:27Z")

</div>

Ok, so I managed to get some meaningful errors back, but first I had  
to comment this out:

```
            Settings settings =

```

ImmutableSettings.settingsBuilder()  
.put("index.number\_of\_shards", 1)  
.put("index.number\_of\_replicas", 1)  
.put("discovery.zen.ping.multicast.enabled",  
false)  
.put("discovery.zen.ping.unicast.enabled",  
true)  
.put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
166.15.121.116[9301],166.15.121.116[9302]")  
.build();

and instead use a .yml file on the class path using  
".loadConfigSettings(false) ". After that the config in the YAML was  
picked up.

Then I get this error comming back:

```
org.elasticsearch.transport.RemoteTransportException: [Dredmund

```

Druid][inet[/166.15.121.116:9300]][discovery/zen/join]  
Caused by: org.elasticsearch.transport.ConnectTransportException:  
[Delilah][inet[/166.15.121.116:9301]] General node connection failure

which resolves to this:

```
Caused by: java.lang.IllegalStateException: await*() in I/O thread

```

causes a dead lock or sudden performance drop. Use addListener()  
instead or call await\*() from a different thread.  
at  
org.elasticsearch.common.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:  
296)

David.

On Mar 15, 10:55 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Hey,
> 
> The configuration looks good (though all formatting is lost when you paste it in an email). Can you turn on TRACE logging for the discovery module? If its on the server side, just add discovery: TRACE in the logging.yml file. If its on the Java client side, make sure to turn on TRACE logging for org.elasticsearch.discovery. And _gist_ the log output?
> 
> On Tuesday, March 15, 2011 at 9:00 PM, davrob2 wrote:
> 
> > Hi,
> 
> > I need some help in configuring unicast in 15.0:
> 
> > This is my YAML config on the "master" (data=true) node:
> 
> > cluster:  
> > name: CMTLocal
> 
> > node:  
> > data: true
> 
> > http:  
> > enabled: true
> 
> > discovery:  
> > zen:  
> > ping:  
> > multicast:  
> > enabled: false  
> > unicast:  
> > hosts: 166.15.121.116[9300],166.15.121.116[9301],  
> > 166.15.121.116[9302]
> 
> > When Starting this node I get:
> 
> > bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/  
> > 166.15.121.116:9300]}
> 
> > From my client node I do this:
> 
> > Settings settings = ImmutableSettings.settingsBuilder()  
> > .put("index.number\_of\_shards", 1)  
> > .put("index.number\_of\_replicas", 1)  
> > .put("discovery.zen.ping.multicast.enabled", false)  
> > .put("discovery.zen.ping.unicast.enabled", true)  
> > .put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
> > 166.15.121.116[9301],166.15.121.116[9302]")  
> > .build();
> 
> > Node hostNode = NodeBuilder.nodeBuilder()  
> > .loadConfigSettings(false)  
> > .clusterName("CMTLocal")  
> > .client(true)  
> > .settings(settings)  
> > .node()  
> > .start();
> 
> > Which gives me:
> 
> > bound\_address {inet[/0.0.0.0:9301]}, publish\_address {inet[/  
> > 166.15.121.116:9301]}  
> > waited for 30s and no initial state was set by the discovery
> 
> > Then the client fails to find the master.
> 
> > Best Regards,
> 
> > David.

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [March 16, 2011, 5:42pm UTC](https://discuss.elastic.co/t/unicast-help/4102/5 "2011-03-16T17:42:33Z")

</div>

Right, in this case, upgrade to 0.15.2, it was fixed there.

Why did you need to get the logging file loaded for elasticsearch? It will use, by default, whatever logging framework you use in your app in this order: slf4j, log4j, juli. So, in your client code, whatever logging you use, will be used by elasticsearch, and all you need is to configure it there.

-shay.banon  
On Wednesday, March 16, 2011 at 6:17 PM, davrob2 wrote:

> Ok, so I managed to get some meaningful errors back, but first I had  
> to comment this out:
> 
> Settings settings =  
> ImmutableSettings.settingsBuilder()  
> .put("index.number\_of\_shards", 1)  
> .put("index.number\_of\_replicas", 1)  
> .put("discovery.zen.ping.multicast.enabled",  
> false)  
> .put("discovery.zen.ping.unicast.enabled",  
> true)  
> .put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
> 166.15.121.116[9301],166.15.121.116[9302]")  
> .build();
> 
> and instead use a .yml file on the class path using  
> ".loadConfigSettings(false) ". After that the config in the YAML was  
> picked up.
> 
> Then I get this error comming back:
> 
> org.elasticsearch.transport.RemoteTransportException: [Dredmund  
> Druid][inet[/166.15.121.116:9300]][discovery/zen/join]  
> Caused by: org.elasticsearch.transport.ConnectTransportException:  
> [Delilah][inet[/166.15.121.116:9301]] General node connection failure
> 
> which resolves to this:
> 
> Caused by: java.lang.IllegalStateException: await\*() in I/O thread  
> causes a dead lock or sudden performance drop. Use addListener()  
> instead or call await\*() from a different thread.  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:  
> 296)
> 
> David.
> 
> On Mar 15, 10:55 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> 
> > Hey,
> > 
> > The configuration looks good (though all formatting is lost when you paste it in an email). Can you turn on TRACE logging for the discovery module? If its on the server side, just add discovery: TRACE in the logging.yml file. If its on the Java client side, make sure to turn on TRACE logging for org.elasticsearch.discovery. And _gist_ the log output?
> > 
> > On Tuesday, March 15, 2011 at 9:00 PM, davrob2 wrote:
> > 
> > > Hi,
> > 
> > > I need some help in configuring unicast in 15.0:
> > 
> > > This is my YAML config on the "master" (data=true) node:
> > 
> > > cluster:  
> > > name: CMTLocal
> > 
> > > node:  
> > > data: true
> > 
> > > http:  
> > > enabled: true
> > 
> > > discovery:  
> > > zen:  
> > > ping:  
> > > multicast:  
> > > enabled: false  
> > > unicast:  
> > > hosts: 166.15.121.116[9300],166.15.121.116[9301],  
> > > 166.15.121.116[9302]
> > 
> > > When Starting this node I get:
> > 
> > > bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/  
> > > 166.15.121.116:9300]}
> > 
> > > From my client node I do this:
> > 
> > > Settings settings = ImmutableSettings.settingsBuilder()  
> > > .put("index.number\_of\_shards", 1)  
> > > .put("index.number\_of\_replicas", 1)  
> > > .put("discovery.zen.ping.multicast.enabled", false)  
> > > .put("discovery.zen.ping.unicast.enabled", true)  
> > > .put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
> > > 166.15.121.116[9301],166.15.121.116[9302]")  
> > > .build();
> > 
> > > Node hostNode = NodeBuilder.nodeBuilder()  
> > > .loadConfigSettings(false)  
> > > .clusterName("CMTLocal")  
> > > .client(true)  
> > > .settings(settings)  
> > > .node()  
> > > .start();
> > 
> > > Which gives me:
> > 
> > > bound\_address {inet[/0.0.0.0:9301]}, publish\_address {inet[/  
> > > 166.15.121.116:9301]}  
> > > waited for 30s and no initial state was set by the discovery
> > 
> > > Then the client fails to find the master.
> > 
> > > Best Regards,
> > 
> > > David.

---

<div class="post-metadata">

### Author: ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)
#### Post date: [March 16, 2011, 6:23pm UTC](https://discuss.elastic.co/t/unicast-help/4102/6 "2011-03-16T18:23:43Z")

</div>

Hi,

Just upgraded and that fixed it thanks.

By logging, I just meant that when I used the java config, the errors  
being thrown were not Transport exceptions but out-of-memory errors  
being caused by something else entirely. Actually, I would rather  
configure the client node with a .yml file, just didn't know how to do  
it before now.

Best,

David.

On Mar 16, 5:42 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:

> Right, in this case, upgrade to 0.15.2, it was fixed there.
> 
> Why did you need to get the logging file loaded for elasticsearch? It will use, by default, whatever logging framework you use in your app in this order: slf4j, log4j, juli. So, in your client code, whatever logging you use, will be used by elasticsearch, and all you need is to configure it there.
> 
> -shay.banon
> 
> On Wednesday, March 16, 2011 at 6:17 PM, davrob2 wrote:
> 
> > Ok, so I managed to get some meaningful errors back, but first I had  
> > to comment this out:
> 
> > Settings settings =  
> > ImmutableSettings.settingsBuilder()  
> > .put("index.number\_of\_shards", 1)  
> > .put("index.number\_of\_replicas", 1)  
> > .put("discovery.zen.ping.multicast.enabled",  
> > false)  
> > .put("discovery.zen.ping.unicast.enabled",  
> > true)  
> > .put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
> > 166.15.121.116[9301],166.15.121.116[9302]")  
> > .build();
> 
> > and instead use a .yml file on the class path using  
> > ".loadConfigSettings(false) ". After that the config in the YAML was  
> > picked up.
> 
> > Then I get this error comming back:
> 
> > org.elasticsearch.transport.RemoteTransportException: [Dredmund  
> > Druid][inet[/166.15.121.116:9300]][discovery/zen/join]  
> > Caused by: org.elasticsearch.transport.ConnectTransportException:  
> > [Delilah][inet[/166.15.121.116:9301]] General node connection failure
> 
> > which resolves to this:
> 
> > Caused by: java.lang.IllegalStateException: await\*() in I/O thread  
> > causes a dead lock or sudden performance drop. Use addListener()  
> > instead or call await\*() from a different thread.  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:  
> > 296)
> 
> > David.
> 
> > On Mar 15, 10:55 pm, Shay Banon [shay.ba...@elasticsearch.com](mailto:shay.ba...@elasticsearch.com) wrote:
> > 
> > > Hey,
> 
> > > The configuration looks good (though all formatting is lost when you paste it in an email). Can you turn on TRACE logging for the discovery module? If its on the server side, just add discovery: TRACE in the logging.yml file. If its on the Java client side, make sure to turn on TRACE logging for org.elasticsearch.discovery. And _gist_ the log output?
> 
> > > On Tuesday, March 15, 2011 at 9:00 PM, davrob2 wrote:
> > > 
> > > > Hi,
> 
> > > > I need some help in configuring unicast in 15.0:
> 
> > > > This is my YAML config on the "master" (data=true) node:
> 
> > > > cluster:  
> > > > name: CMTLocal
> 
> > > > node:  
> > > > data: true
> 
> > > > http:  
> > > > enabled: true
> 
> > > > discovery:  
> > > > zen:  
> > > > ping:  
> > > > multicast:  
> > > > enabled: false  
> > > > unicast:  
> > > > hosts: 166.15.121.116[9300],166.15.121.116[9301],  
> > > > 166.15.121.116[9302]
> 
> > > > When Starting this node I get:
> 
> > > > bound\_address {inet[/0.0.0.0:9300]}, publish\_address {inet[/  
> > > > 166.15.121.116:9300]}
> 
> > > > From my client node I do this:
> 
> > > > Settings settings = ImmutableSettings.settingsBuilder()  
> > > > .put("index.number\_of\_shards", 1)  
> > > > .put("index.number\_of\_replicas", 1)  
> > > > .put("discovery.zen.ping.multicast.enabled", false)  
> > > > .put("discovery.zen.ping.unicast.enabled", true)  
> > > > .put("discovery.zen.ping.unicast.hosts ", "166.15.121.116[9300],  
> > > > 166.15.121.116[9301],166.15.121.116[9302]")  
> > > > .build();
> 
> > > > Node hostNode = NodeBuilder.nodeBuilder()  
> > > > .loadConfigSettings(false)  
> > > > .clusterName("CMTLocal")  
> > > > .client(true)  
> > > > .settings(settings)  
> > > > .node()  
> > > > .start();
> 
> > > > Which gives me:
> 
> > > > bound\_address {inet[/0.0.0.0:9301]}, publish\_address {inet[/  
> > > > 166.15.121.116:9301]}  
> > > > waited for 30s and no initial state was set by the discovery
> 
> > > > Then the client fails to find the master.
> 
> > > > Best Regards,
> 
> > > > David.

---

<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: [July 6, 2017, 4:09am UTC](https://discuss.elastic.co/t/unicast-help/4102/7 "2017-07-06T04:09:55Z")

</div>


