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

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

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

JSON config file that I use in my code:
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

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.comwrote:

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

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

JSON config file that I use in my code:
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

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 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
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

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

JSON config file that I use in my code:
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

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
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
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
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

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

JSON config file that I use in my code:
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