# Running a stand-alone node and a client on the same machine

**URL:** <https://discuss.elastic.co/t/running-a-stand-alone-node-and-a-client-on-the-same-machine/4901>\
**Category:** Elasticsearch\
**Created:** [July 19, 2011, 10:54pm UTC](https://discuss.elastic.co/t/running-a-stand-alone-node-and-a-client-on-the-same-machine/4901 "2011-07-19T22:54:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavier\_Stevens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavier_stevens/32/3089_2.png) [@Xavier\_Stevens](https://discuss.elastic.co/u/Xavier_Stevens)\
**Post date:** [July 19, 2011, 10:54pm UTC](https://discuss.elastic.co/t/running-a-stand-alone-node-and-a-client-on-the-same-machine/4901/1 "2011-07-19T22:54:22Z")

</div>

I'm currently trying to run a stand-alone node along with a client (my  
code using Java API) on the same machine.

I get this exception when I try to start up my code:

11/07/19 15:30:04 INFO discovery.zen: [Felicia Hardy] failed to send  
join request to master  
[[Fearmaster‚Äé][8lJ\_ukYyQG-7WlFOOrW5Vg][inet[/192.168.1.139:9300]]],  
reason [org.elasticsearch.transport.RemoteTransportException: [Felicia  
Hardy][inet[/192.168.1.139:9300]][discovery/zen/join];  
org.elasticsearch.ElasticSearchIllegalStateException: Node [[Felicia  
Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
data=false}] not master for join request from [[Felicia  
Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
data=false}]]

I'm launching the stand-alone server like so:

bin/elasticsearch -f -Des.config.file=config/elasticsearch.yml  
YML file that I use with stand-alone server:  
[http://xstevens.pastebin.mozilla.org/1276461](http://xstevens.pastebin.mozilla.org/1276461)

And then for the client here's the code snippet which creates the  
connection: [http://xstevens.pastebin.mozilla.org/1276456](http://xstevens.pastebin.mozilla.org/1276456)

JSON config file that I use in my code:  
[http://xstevens.pastebin.mozilla.org/1276458](http://xstevens.pastebin.mozilla.org/1276458)

Notes on the code: configFile is definitely not null and gets loaded,  
storeData=false.

Not sure what I'm doing wrong here.

Thanks in advance,

-Xavier

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 19, 2011, 11:09pm UTC](https://discuss.elastic.co/t/running-a-stand-alone-node-and-a-client-on-the-same-machine/4901/2 "2011-07-19T23:09:37Z")

</div>

What are the values that you pass in the properties? (local flag, and so  
on)? Why do you need to call node.start() if you "storeData" (not that its a  
problem, then node has already been started when you call  
nodeBuilder#node()).

On Wed, Jul 20, 2011 at 1:54 AM, Xavier Stevens [xavier.stevens@gmail.com](mailto:xavier.stevens@gmail.com)wrote:

> I'm currently trying to run a stand-alone node along with a client (my  
> code using Java API) on the same machine.
> 
> I get this exception when I try to start up my code:
> 
> 11/07/19 15:30:04 INFO discovery.zen: [Felicia Hardy] failed to send  
> join request to master  
> [[Fearmaster‚Äé][8lJ\_ukYyQG-7WlFOOrW5Vg][inet[/192.168.1.139:9300]]],  
> reason [org.elasticsearch.transport.RemoteTransportException: [Felicia  
> Hardy][inet[/192.168.1.139:9300]][discovery/zen/join];  
> org.elasticsearch.ElasticSearchIllegalStateException: Node [[Felicia  
> Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
> data=false}] not master for join request from [[Felicia  
> Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
> data=false}]]
> 
> I'm launching the stand-alone server like so:
> 
> bin/elasticsearch -f -Des.config.file=config/elasticsearch.yml  
> YML file that I use with stand-alone server:  
> [http://xstevens.pastebin.mozilla.org/1276461](http://xstevens.pastebin.mozilla.org/1276461)
> 
> And then for the client here's the code snippet which creates the  
> connection: [http://xstevens.pastebin.mozilla.org/1276456](http://xstevens.pastebin.mozilla.org/1276456)
> 
> JSON config file that I use in my code:  
> [http://xstevens.pastebin.mozilla.org/1276458](http://xstevens.pastebin.mozilla.org/1276458)
> 
> Notes on the code: configFile is definitely not null and gets loaded,  
> storeData=false.
> 
> Not sure what I'm doing wrong here.
> 
> Thanks in advance,
> 
> -Xavier

---

<div class="post-metadata">

**Author:** ![Xavier\_Stevens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavier_stevens/32/3089_2.png) [@Xavier\_Stevens](https://discuss.elastic.co/u/Xavier_Stevens)\
**Post date:** [July 19, 2011, 11:21pm UTC](https://discuss.elastic.co/t/running-a-stand-alone-node-and-a-client-on-the-same-machine/4901/3 "2011-07-19T23:21:32Z")

</div>

Properties that are set:  
configFile=elasticsearch-release.json  
storeData=false (which is also the default)

Since configFile isn't null the other properties aren't used here.

I wasn't sure if I needed to call node.start() or not. So I can just  
remove it then.

-Xavier

On Tue, Jul 19, 2011 at 4:09 PM, Shay Banon  
[shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com) wrote:

> What are the values that you pass in the properties? (local flag, and so  
> on)? Why do you need to call node.start() if you "storeData" (not that its a  
> problem, then node has already been started when you call  
> nodeBuilder#node()).
> 
> On Wed, Jul 20, 2011 at 1:54 AM, Xavier Stevens [xavier.stevens@gmail.com](mailto:xavier.stevens@gmail.com)  
> wrote:
> 
> > I'm currently trying to run a stand-alone node along with a client (my  
> > code using Java API) on the same machine.
> > 
> > I get this exception when I try to start up my code:
> > 
> > 11/07/19 15:30:04 INFO discovery.zen: [Felicia Hardy] failed to send  
> > join request to master  
> > [[Fearmaster‚Äé][8lJ\_ukYyQG-7WlFOOrW5Vg][inet[/192.168.1.139:9300]]],  
> > reason [org.elasticsearch.transport.RemoteTransportException: [Felicia  
> > Hardy][inet[/192.168.1.139:9300]][discovery/zen/join];  
> > org.elasticsearch.ElasticSearchIllegalStateException: Node [[Felicia  
> > Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
> > data=false}] not master for join request from [[Felicia  
> > Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
> > data=false}]]
> > 
> > I'm launching the stand-alone server like so:
> > 
> > bin/elasticsearch -f -Des.config.file=config/elasticsearch.yml  
> > YML file that I use with stand-alone server:  
> > [http://xstevens.pastebin.mozilla.org/1276461](http://xstevens.pastebin.mozilla.org/1276461)
> > 
> > And then for the client here's the code snippet which creates the  
> > connection: [http://xstevens.pastebin.mozilla.org/1276456](http://xstevens.pastebin.mozilla.org/1276456)
> > 
> > JSON config file that I use in my code:  
> > [http://xstevens.pastebin.mozilla.org/1276458](http://xstevens.pastebin.mozilla.org/1276458)
> > 
> > Notes on the code: configFile is definitely not null and gets loaded,  
> > storeData=false.
> > 
> > Not sure what I'm doing wrong here.
> > 
> > Thanks in advance,
> > 
> > -Xavier

--  
[http://about.me/xstevens](http://about.me/xstevens)

---

<div class="post-metadata">

**Author:** ![Xavier\_Stevens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavier_stevens/32/3089_2.png) [@Xavier\_Stevens](https://discuss.elastic.co/u/Xavier_Stevens)\
**Post date:** [July 20, 2011, 4:46pm UTC](https://discuss.elastic.co/t/running-a-stand-alone-node-and-a-client-on-the-same-machine/4901/4 "2011-07-20T16:46:41Z")

</div>

So I've narrowed this down a bit.

I start up the elasticsearch server like so:  
bin/elasticsearch -f -Des.config.file=elasticsearch.yml

It shows in the logs that it has elected itself as the master.

So then when I fire up my client in eclipse debugger it gets all the way  
through to the join request in ZenDiscovery. The server side then sends  
back the exception which can only occur if it isn't the master. This is  
implying that ZenDiscovery.master is not set on the server which  
contradicts the logs.

-Xavier

> * * *
> 
> Xavier Stevens [mailto:xavier.stevens@gmail.com](mailto:xavier.stevens@gmail.com)  
> July 19, 2011 4:21 PM
> 
> Properties that are set:  
> configFile=elasticsearch-release.json  
> storeData=false (which is also the default)
> 
> Since configFile isn't null the other properties aren't used here.
> 
> I wasn't sure if I needed to call node.start() or not. So I can just  
> remove it then.
> 
> -Xavier
> 
> On Tue, Jul 19, 2011 at 4:09 PM, Shay Banon
> 
> * * *
> 
> Shay Banon [mailto:shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)  
> July 19, 2011 4:09 PM
> 
> What are the values that you pass in the properties? (local flag, and  
> so on)? Why do you need to call node.start() if you "storeData" (not  
> that its a problem, then node has already been started when you call  
> nodeBuilder#node()).
> 
> * * *
> 
> Xavier Stevens [mailto:xavier.stevens@gmail.com](mailto:xavier.stevens@gmail.com)  
> July 19, 2011 3:54 PM
> 
> I'm currently trying to run a stand-alone node along with a client (my  
> code using Java API) on the same machine.
> 
> I get this exception when I try to start up my code:
> 
> 11/07/19 15:30:04 INFO discovery.zen: [Felicia Hardy] failed to send  
> join request to master  
> [[Fearmaster‚Äé][8lJ\_ukYyQG-7WlFOOrW5Vg][inet[/192.168.1.139:9300]]],  
> reason [org.elasticsearch.transport.RemoteTransportException: [Felicia  
> Hardy][inet[/192.168.1.139:9300]][discovery/zen/join];  
> org.elasticsearch.ElasticSearchIllegalStateException: Node [[Felicia  
> Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
> data=false}] not master for join request from [[Felicia  
> Hardy][F1KXXIhpTDqRokly-7RA0w][inet[/192.168.1.139:9300]]{client=true,  
> data=false}]]
> 
> I'm launching the stand-alone server like so:
> 
> bin/elasticsearch -f -Des.config.file=config/elasticsearch.yml  
> YML file that I use with stand-alone server:  
> [http://xstevens.pastebin.mozilla.org/1276461](http://xstevens.pastebin.mozilla.org/1276461)
> 
> And then for the client here's the code snippet which creates the  
> connection: [http://xstevens.pastebin.mozilla.org/1276456](http://xstevens.pastebin.mozilla.org/1276456)
> 
> JSON config file that I use in my code:  
> [http://xstevens.pastebin.mozilla.org/1276458](http://xstevens.pastebin.mozilla.org/1276458)
> 
> Notes on the code: configFile is definitely not null and gets loaded,  
> storeData=false.
> 
> Not sure what I'm doing wrong here.
> 
> Thanks in advance,
> 
> -Xavier

---

<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, 4:00am UTC](https://discuss.elastic.co/t/running-a-stand-alone-node-and-a-client-on-the-same-machine/4901/5 "2017-07-06T04:00:01Z")

</div>


