I am trying to use Java API to create an ES Client. My Grails worked fine
utilizing Elasticsearch in the local (same JVM) mode. For clustering
purposes I am trying to change the application to use the "node" mode. The
application uses Grail Elasticsearch plugin. I first start ES server (I am
using 0.19.3 on both ends). After the server starts I start the Grails
application which through the plugin runs the following code:
def nb = NodeBuilder.nodeBuilder()
nb.client(true)
node = nb.node()
node.start()
def client = node.client()
...
The Grails application is unable to start because the new node does not
connect to the server. I can see the node trying to connect.
Here is the server log:
[2012-09-26 13:10:34,023][INFO ][node ] [Sinclar,
Nekra] {0.19.3}[9146]: initializing ...
[2012-09-26 13:10:34,027][INFO ][plugins ] [Sinclar,
Nekra] loaded , sites
[2012-09-26 13:10:35,519][INFO ][node ] [Sinclar,
Nekra] {0.19.3}[9146]: initialized
[2012-09-26 13:10:35,519][INFO ][node ] [Sinclar,
Nekra] {0.19.3}[9146]: starting ...
[2012-09-26 13:10:35,570][INFO ][transport ] [Sinclar,
Nekra] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address
{inet[/10.10.16.4:9300]}
[2012-09-26 13:10:38,608][INFO ][cluster.service ] [Sinclar,
Nekra] new_master [Sinclar,
Nekra][un4UD12IRg2S5aGPoOc-rQ][inet[/10.10.16.4:9300]], reason:
zen-disco-join (elected_as_master)
[2012-09-26 13:10:38,643][INFO ][discovery ] [Sinclar,
Nekra] elasticsearch/un4UD12IRg2S5aGPoOc-rQ
[2012-09-26 13:10:38,652][INFO ][http ] [Sinclar,
Nekra] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address
{inet[/10.10.16.4:9200]}
[2012-09-26 13:10:38,652][INFO ][node ] [Sinclar,
Nekra] {0.19.3}[9146]: started
[2012-09-26 13:10:38,653][INFO ][gateway ] [Sinclar,
Nekra] recovered [0] indices into cluster_state
[2012-09-26 13:11:06,737][INFO ][cluster.service ] [Sinclar,
Nekra] added
{[Nighthawk][dZwzxHghQSir5vESBs-InQ][inet[/10.10.16.4:9301]]{client=true,
data=false},}, reason: zen-disco-receive(join from
node[[Nighthawk][dZwzxHghQSir5vESBs-InQ][inet[/10.10.16.4:9301]]{client=true,
data=false}])
[2012-09-26 13:11:09,748][WARN ][discovery.zen ] [Sinclar,
Nekra] received a join request for an existing node
[[Nighthawk][dZwzxHghQSir5vESBs-InQ][inet[/10.10.16.4:9301]]{client=true,
data=false}]
[2012-09-26 13:11:12,753][WARN ][discovery.zen ] [Sinclar,
Nekra] received a join request for an existing node
[[Nighthawk][dZwzxHghQSir5vESBs-InQ][inet[/10.10.16.4:9301]]{client=true,
data=false}]
[2012-09-26 13:11:15,757][WARN ][discovery.zen ] [Sinclar,
Nekra] received a join request for an existing node
[[Nighthawk][dZwzxHghQSir5vESBs-InQ][inet[/10.10.16.4:9301]]{client=true,
data=false}]
... (this repeats many times)
[2012-09-26 13:12:36,141][INFO ][cluster.service ] [Sinclar,
Nekra] removed
{[Nighthawk][dZwzxHghQSir5vESBs-InQ][inet[/10.10.16.4:9301]]{client=true,
data=false},}, reason:
zen-disco-node_failed([Nighthawk][dZwzxHghQSir5vESBs-InQ][inet[/10.10.16.4:9301]]{client=true,
data=false}), reason transport disconnected (with verified connect)
Grails application throws this exception:
Caused by: org.elasticsearch.discovery.MasterNotDiscoveredException: waited
for [30s]
at
org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:169)
at
org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:359)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
What might be causing this behavior? Why the client node is not connecting
to the master?
Thank you,
Michael
--