How to isolate elastic search node from other nodes?

Hello,

I have some integration test of my application. The integration test
starts own elastic search instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running elastic search instance on my computer.
I observed that runnich elastic search instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

Here is the elasticsearch property file I use for JUnit tests:

Node test setup

cluster.name=junit.cluster
name=junit.node

Disable network

discovery.zen.ping.multicast.enabled=false
node.local=true

Using less filesystem as possible

index.store.type=memory
index.store.fs.memory.enabled=true
index.gateway.type=none
gateway.type=none

If ES needs to write something, it's here

path.data=${mytarget}/data
path.logs=${mytarget}/logs

Index are minimalists by default

index.number_of_shards=1
index.number_of_replicas=0

HTH
David.

Le 10 mai 2012 à 17:19, Michal Domagala outsider404@gmail.com a écrit :

Hello,

I have some integration test of my application. The integration test
starts own Elasticsearch instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running Elasticsearch instance on my computer.
I observed that runnich Elasticsearch instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

Michal,

Maybe I do not understand your question enough...

We have 4 ES clusters inside our LAN without any problem.

We simply ensure we have unique cluster name for each cluster
and we also use Unicast and list all the nodes IP address for that
cluster in the elasticsearch.yml config file for each cluster.

That should do it.

--Andrew

On May 10, 10:19 am, Michal Domagala outsider...@gmail.com wrote:

Hello,

I have some integration test of my application. The integration test
starts own Elasticsearch instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running Elasticsearch instance on my computer.
I observed that runnich Elasticsearch instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

Problem is that ES find other nodes in the LAN and ask each of them the
cluster name.

But, If you have one instance running 0.17.1, one other with 0.18.1 and the
last one on 0.19.1, nodes can not speak to each others.

That's why it could be better to isolate nodes when doing unit tests.

My 2 cents
David.

Le 10 mai 2012 à 17:26, "Andrew[.:at:.]DataFeedFile.com"
andrew@datafeedfile.com a écrit :

Michal,

Maybe I do not understand your question enough...

We have 4 ES clusters inside our LAN without any problem.

We simply ensure we have unique cluster name for each cluster
and we also use Unicast and list all the nodes IP address for that
cluster in the elasticsearch.yml config file for each cluster.

That should do it.

--Andrew

On May 10, 10:19 am, Michal Domagala outsider...@gmail.com wrote:

Hello,

I have some integration test of my application. The integration test
starts own Elasticsearch instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running Elasticsearch instance on my computer.
I observed that runnich Elasticsearch instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

Thanks David, that's exacty what I need

On 10 Maj, 17:30, "da...@pilato.fr" da...@pilato.fr wrote:

Problem is that ES find other nodes in the LAN and ask each of them the
cluster name.

But, If you have one instance running 0.17.1, one other with 0.18.1 and the
last one on 0.19.1, nodes can not speak to each others.

That's why it could be better to isolate nodes when doing unit tests.

My 2 cents
David.

Le 10 mai 2012 à 17:26, "Andrew[.:at:.]DataFeedFile.com"
and...@datafeedfile.com a écrit :

Michal,

Maybe I do not understand your question enough...

We have 4 ES clusters inside our LAN without any problem.

We simply ensure we have unique cluster name for each cluster
and we also use Unicast and list all the nodes IP address for that
cluster in the elasticsearch.yml config file for each cluster.

That should do it.

--Andrew

On May 10, 10:19 am, Michal Domagala outsider...@gmail.com wrote:

Hello,

I have some integration test of my application. The integration test
starts own Elasticsearch instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running Elasticsearch instance on my computer.
I observed that runnich Elasticsearch instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

--
David Pilatohttp://dev.david.pilato.fr/
Twitter : @dadoonet

You set the node to local(true), this means it will not discover other
nodes using network, only within the same JVM.

On Thu, May 10, 2012 at 6:19 PM, Michal Domagala outsider404@gmail.comwrote:

Hello,

I have some integration test of my application. The integration test
starts own Elasticsearch instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running Elasticsearch instance on my computer.
I observed that runnich Elasticsearch instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

I'm attempting to use this config for my tests.

I am able to index a document but when I perform a get request on the id i
just get back an empty document {}

On Thursday, May 10, 2012 10:25:59 AM UTC-5, David Pilato wrote:

Here is the elasticsearch property file I use for JUnit tests:

Node test setup

cluster.name=junit.cluster
name=junit.node

Disable network

discovery.zen.ping.multicast.enabled=false
node.local=true

Using less filesystem as possible

index.store.type=memory
index.store.fs.memory.enabled=true
index.gateway.type=none
gateway.type=none

If ES needs to write something, it's here

path.data=${mytarget}/data
path.logs=${mytarget}/logs

Index are minimalists by default

index.number_of_shards=1
index.number_of_replicas=0

HTH

David.

Le 10 mai 2012 à 17:19, Michal Domagala <outsi...@gmail.com <javascript:>>
a écrit :

Hello,

I have some integration test of my application. The integration test
starts own Elasticsearch instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running Elasticsearch instance on my computer.
I observed that runnich Elasticsearch instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

--

Hey,

Have a look at this project: GitHub - elasticsearchfr/hands-on at answers
It will help you to start with JUnit tests.

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 oct. 2012 à 20:07, Douglas Ferguson thedug@gmail.com a écrit :

I'm attempting to use this config for my tests.

I am able to index a document but when I perform a get request on the id i just get back an empty document {}

On Thursday, May 10, 2012 10:25:59 AM UTC-5, David Pilato wrote:

Here is the elasticsearch property file I use for JUnit tests:

Node test setup

cluster.name=junit.cluster
name=junit.node

Disable network

discovery.zen.ping.multicast.enabled=false
node.local=true

Using less filesystem as possible

index.store.type=memory
index.store.fs.memory.enabled=true
index.gateway.type=none
gateway.type=none

If ES needs to write something, it's here

path.data=${mytarget}/data
path.logs=${mytarget}/logs

Index are minimalists by default

index.number_of_shards=1
index.number_of_replicas=0

HTH
David.

Le 10 mai 2012 à 17:19, Michal Domagala outsi...@gmail.com a écrit :

Hello,

I have some integration test of my application. The integration test
starts own Elasticsearch instance by node =
nodeBuilder().settings(settings).local(true).node();

and do its job.

However, I have other, running Elasticsearch instance on my computer.
I observed that runnich Elasticsearch instance and integration test
instance establish a connection (because I see IO exception in running
ES log when integration test is terminated)

My question is: how to configure ES for integration test to make sure
it is isolated against any other working ES in my computer/LAN?

I tried settings
.put("multicast.enabled","false")
.put("discovery.zen.ping.multicast.ping.enabled", "false")

but without success

best regards
Michal Domagala

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet

--

--