Node client seems to be a master only node

(Joan Balagueró) #1


I'm starting ES 2.1.1 from console on my server (

[2016-01-08 13:38:17,650][INFO ][node                     ] [ventusproxy01] starting ...
[2016-01-08 13:38:17,726][INFO ][transport             ] [ventusproxy01] publish_address {}, bound_addresses {}
[2016-01-08 13:38:17,736][INFO ][discovery             ] [ventusproxy01] cl1_ventusproxy/BKS4B1E0QoW-TAuLtxftnA
[2016-01-08 13:38:20,760][INFO ][cluster.service    ] [ventusproxy01] new_master {ventusproxy01}{BKS4B1E0QoW-TAuLtxftnA}{}{}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-01-08 13:38:20,773][INFO ][http                      ] [ventusproxy01] publish_address {}, bound_addresses {}
[2016-01-08 13:38:20,773][INFO ][node                     ] [ventusproxy01] started

Now I'm trying to connect to this instance from a java app within the same node ( using the NODE CLIENT and acting just as a client (no data). This is my code, I'm setting the mandatory "path.home" to the ES server installation:

Settings.Builder s = NodeBuilder.nodeBuilder().settings();
s.put("", "cl1_ventusproxy");
s.put("", "client_ventusproxy01");
s.put("path.home", "/usr/local/elasticsearch-2.1.1");
this.node  = NodeBuilder.nodeBuilder().settings(s).data(false).client(true).node();
this.client  = this.node.client();

This is the trace when this client starts:

2016-01-08 14:19:56     [client_ventusproxy01] version[2.1.1], pid[19458], build[40e2c53/2015-12-15T13:05:55Z]
2016-01-08 14:19:56     [client_ventusproxy01] initializing ...
2016-01-08 14:19:58     [client_ventusproxy01] initialized
2016-01-08 14:19:58     [client_ventusproxy01] starting ...
2016-01-08 14:19:58     [client_ventusproxy01] publish_address {}, bound_addresses {}
2016-01-08 14:19:58     [client_ventusproxy01] cl1_ventusproxy/SpFR4etZQHmo9UZS8Z5OrA
2016-01-08 14:20:02     [client_ventusproxy01] detected_master {ventusproxy01}{wSougvHeSVe8gNDWa2WHlQ}{}{}, added {{ventusproxy01}{wSougvHeSVe8gNDWa2WHlQ}{}{},}, reason: zen-disco-receive(from master [{ventusproxy01}{wSougvHeSVe8gNDWa2WHlQ}{}{}])
2016-01-08 14:20:02     [client_ventusproxy01] publish_address {}, bound_addresses {}
2016-01-08 14:20:02     [client_ventusproxy01] started

And we can see this in the console we used to start ES server:

[2016-01-08 14:20:01,981][INFO ][cluster.service          ] [ventusproxy01] added {{client_ventusproxy01}{SpFR4etZQHmo9UZS8Z5OrA}{}{}{client=true, data=false},}, reason: zen-disco-join(join from node[{client_ventusproxy01}{SpFR4etZQHmo9UZS8Z5OrA}{}{}{client=true, data=false}])

But when I check the cluster from Marvel, I see "client_ventusproxy01" as a "Master only node" and "ventusproxy01" as a "Master node".

Should not "client_ventusproxy01" be just a client? Why is it detected as a "Master only node"? Is this due to the client "path.home" is set to the ES server installation? If this is the problem, what should I set then?

It would be great if someone could clarify this.


(David Pilato) #2

Not sure if this is your issue but the way you should build settings is:


(Joan Balagueró) #3

Changed and I get the same.

From Marvel I see that the "client_ventusproxy01" has no indexes, no documents, no data, no shards. But the "ventusproxy01" (our master node) contains all the indexes and shards that I'm creating from my client.

So is it possible that "Master only node" really means "Just client with no data" as I need?

(David Pilato) #4

Reading again your logs, I don't see anything wrong.

You started a node (which is master by default) and then started a Java client which joins the cluster.

Nothing looks wrong to me.

But if you don't want to see your node joining the cluster, you should use a Transport Client instead of a Client Node...

(Joan Balagueró) #5

Thanks David. Yes, this is what I though as well. I think that I was confused when I saw "master only node" in Marvel (for my client). I suppose that "master only node" is the same than client ...

(David Pilato) #6

Well. Could you make a screenshot of Marvel so we could open an issue about this?

(Joan Balagueró) #7


Sorry for the delay. I had to uninstall marvel and install it again.

Here the image:

The 'client_ventusproxy01' node is the client only node. If you move the cursor over the white star, the message that appears in the 'alt' is 'Master only node'.

(system) #8