Hello,
I'm starting ES 2.1.1 from console on my server (192.168.1.70):
[2016-01-08 13:38:17,650][INFO ][node ] [ventusproxy01] starting ...
[2016-01-08 13:38:17,726][INFO ][transport ] [ventusproxy01] publish_address {192.168.1.70:9300}, bound_addresses {192.168.1.70:9300}
[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}{192.168.1.70}{192.168.1.70:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-01-08 13:38:20,773][INFO ][http ] [ventusproxy01] publish_address {192.168.1.70:9200}, bound_addresses {192.168.1.70:9200}
[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 (192.168.1.70) 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("cluster.name", "cl1_ventusproxy");
s.put("node.name", "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 {192.168.1.70:9301}, bound_addresses {192.168.1.70:9301}
2016-01-08 14:19:58 [client_ventusproxy01] cl1_ventusproxy/SpFR4etZQHmo9UZS8Z5OrA
2016-01-08 14:20:02 [client_ventusproxy01] detected_master {ventusproxy01}{wSougvHeSVe8gNDWa2WHlQ}{192.168.1.70}{192.168.1.70:9300}, added {{ventusproxy01}{wSougvHeSVe8gNDWa2WHlQ}{192.168.1.70}{192.168.1.70:9300},}, reason: zen-disco-receive(from master [{ventusproxy01}{wSougvHeSVe8gNDWa2WHlQ}{192.168.1.70}{192.168.1.70:9300}])
2016-01-08 14:20:02 [client_ventusproxy01] publish_address {192.168.1.70:9201}, bound_addresses {192.168.1.70:9201}
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}{192.168.1.70}{192.168.1.70:9301}{client=true, data=false},}, reason: zen-disco-join(join from node[{client_ventusproxy01}{SpFR4etZQHmo9UZS8Z5OrA}{192.168.1.70}{192.168.1.70:9301}{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.
Thanks.