# Unable to create a Client node

**URL:** <https://discuss.elastic.co/t/unable-to-create-a-client-node/9162>\
**Category:** Elasticsearch\
**Created:** [September 26, 2012, 6:05pm UTC](https://discuss.elastic.co/t/unable-to-create-a-client-node/9162 "2012-09-26T18:05:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Smolyak](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Michael\_Smolyak](https://discuss.elastic.co/u/Michael_Smolyak)\
**Post date:** [September 26, 2012, 6:05pm UTC](https://discuss.elastic.co/t/unable-to-create-a-client-node/9162/1 "2012-09-26T18:05:47Z")

</div>

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

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2012, 7:14pm UTC](https://discuss.elastic.co/t/unable-to-create-a-client-node/9162/2 "2012-09-26T19:14:10Z")

</div>

Hmmm. Do you have some settings that override defaults (cluster.name,  
unicast, …)?

If you have launched your ES server (standalone) with another cluster name,  
that’s the reason.

David.

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)]  
De la part de Michael Smolyak  
Envoyé : mercredi 26 septembre 2012 20:06  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Unable to create a Client node

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:9  
301]]{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(I  
nternalClusterService.java:359)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja  
va:886)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9  
08)  
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

--

--

---

<div class="post-metadata">

**Author:** ![Michael\_Smolyak](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Michael\_Smolyak](https://discuss.elastic.co/u/Michael_Smolyak)\
**Post date:** [September 26, 2012, 8:04pm UTC](https://discuss.elastic.co/t/unable-to-create-a-client-node/9162/3 "2012-09-26T20:04:45Z")

</div>

David,

I simply downloaded the binary distribution of ES and ran

bin/elasticsearch -f

On the client side I execute the code quoted in my original post. Thus  
neither the server nor the client has any custom configuration.

Should they? Apparently the client is trying to connect and the server sees  
it. Why doesn't the client succeed? What can I do to debug this issue?

Thank you,

Michael

On Wednesday, September 26, 2012 3:14:16 PM UTC-4, David Pilato wrote:

> Hmmm. Do you have some settings that override defaults (cluster.name,  
> unicast, …)?
> 
> If you have launched your ES server (standalone) with another cluster  
> name, that’s the reason.
> 
> David.

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2012, 9:06pm UTC](https://discuss.elastic.co/t/unable-to-create-a-client-node/9162/4 "2012-09-26T21:06:21Z")

</div>

So, you are using defaults.  
It should work. I don't know if you have any "firewall" rules or something like  
that which is blocking 9300 and 9301 ports???

When you launch only the standalone node, can you curl [http://localhost:9200](http://localhost:9200) ?  
When you launch only the grail node, can you curl [http://localhost:9200](http://localhost:9200) ?

When you launch both nodes, can you curl [http://localhost:9200](http://localhost:9200) and curl  
[http://localhost:9201](http://localhost:9201) ?

David

Le 26 septembre 2012 à 22:04, Michael Smolyak [msmolyak.nextcentury@gmail.com](mailto:msmolyak.nextcentury@gmail.com) a  
écrit :

> David,
> 
> I simply downloaded the binary distribution of ES and ran
> 
> bin/elasticsearch -f
> 
> On the client side I execute the code quoted in my original post. Thus  
> neither the server nor the client has any custom configuration.
> 
> Should they? Apparently the client is trying to connect and the server sees  
> it. Why doesn't the client succeed? What can I do to debug this issue?
> 
> Thank you,
> 
> Michael
> 
> On Wednesday, September 26, 2012 3:14:16 PM UTC-4, David Pilato wrote:
> 
> > > 
> > 
> > Hmmm. Do you have some settings that override defaults (cluster.name  
> > [http://cluster.name](http://cluster.name) , unicast, …)?
> > 
> > If you have launched your ES server (standalone) with another cluster  
> > name, that’s the reason.
> > 
> > David.
> > 
> > >
> 
> --

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![Michael\_Smolyak](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@Michael\_Smolyak](https://discuss.elastic.co/u/Michael_Smolyak)\
**Post date:** [September 27, 2012, 9:15pm UTC](https://discuss.elastic.co/t/unable-to-create-a-client-node/9162/5 "2012-09-27T21:15:22Z")

</div>

It appears the problem was in the conflict between the version of  
elasticseach used on the client and on the server. After I synchronized he  
two version I was able to connect.

Thank you for your help, David.

On Wednesday, September 26, 2012 5:06:29 PM UTC-4, David Pilato wrote:

> So, you are using defaults.  
> It should work. I don't know if you have any "firewall" rules or  
> something like that which is blocking 9300 and 9301 ports???
> 
> When you launch only the standalone node, can you curl  
> [http://localhost:9200](http://localhost:9200) ?  
> When you launch only the grail node, can you curl [http://localhost:9200](http://localhost:9200)?
> 
> When you launch both nodes, can you curl [http://localhost:9200](http://localhost:9200) and curl  
> [http://localhost:9201](http://localhost:9201) ?
> 
> David
> 
> Le 26 septembre 2012 à 22:04, Michael Smolyak \<[msmolyak.n...@gmail.com](mailto:msmolyak.n...@gmail.com)\<javascript:\>\>  
> a écrit :
> 
> David,
> 
> I simply downloaded the binary distribution of ES and ran
> 
> bin/elasticsearch -f
> 
> On the client side I execute the code quoted in my original post. Thus  
> neither the server nor the client has any custom configuration.
> 
> Should they? Apparently the client is trying to connect and the server  
> sees it. Why doesn't the client succeed? What can I do to debug this issue?
> 
> Thank you,
> 
> Michael
> 
> On Wednesday, September 26, 2012 3:14:16 PM UTC-4, David Pilato wrote:
> 
> Hmmm. Do you have some settings that override defaults (cluster.name,  
> unicast, …)?
> 
> If you have launched your ES server (standalone) with another cluster  
> name, that’s the reason.
> 
> David.
> 
> --
> 
> --  
> David Pilato  
> [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<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, 3:11am UTC](https://discuss.elastic.co/t/unable-to-create-a-client-node/9162/6 "2017-07-06T03:11:04Z")

</div>


