Unicast help

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Unicast help

davrob
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.
Reply | Threaded
Open this post in threaded view
|

Re: Unicast help

kimchy
Administrator
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.

Reply | Threaded
Open this post in threaded view
|

Re: Unicast help

davrob
Hi,

These are my logs and config:

Master (starts first):master.log
Client (Starts later):client.log
Java:init-client-java.txt
elasticsearch.yml:elasticsearch.yml

David.
Reply | Threaded
Open this post in threaded view
|

Re: Unicast help

davrob
In reply to this post by kimchy
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 <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Unicast help

kimchy
Administrator
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> 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.

Reply | Threaded
Open this post in threaded view
|

Re: Unicast help

davrob
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 <[hidden email]> 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 <[hidden email]> 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.