Running Multiple Clusters On One Host


(Ed Brown VSTI) #1

I'm investigating Elasticsearch and would like to run multiple
Elasticsearch clusters on one host.

The first cluster is started up using the default setting except for
memory minimum and maxium.

The second cluster, which I don't want to join the first cluster, is
started with the command line:

./bin/elasticsearch -f -Des.http.port=14000 -
Des.transport.tcp.port=9400 -Dpath.conf=./inst2-config/
elasticsearch.yml

The output is as follows:

=== Start Output ===

[2011-07-28 21:55:01,265][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initializing ...
[2011-07-28 21:55:01,274][INFO ][plugins ] [Tempest]
loaded [], sites []
[2011-07-28 21:55:03,992][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initialized
[2011-07-28 21:55:03,993][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: starting ...
[2011-07-28 21:55:04,247][INFO ][transport ] [Tempest]
bound_address {inet[/192.168.11.124:9400]}, publish_address {inet[/
192.168.11.124:9400]}
[2011-07-28 21:55:07,517][INFO ][cluster.service ] [Tempest]
detected_master [Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]], added {[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]],[Leonus][havEfAcSTD-IITC1nJZ7qw][inet[/
192.168.11.124:9301]],}, reason: zen-disco-receive(from master
[[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/192.168.11.124:9300]]])
[2011-07-28 21:55:08,214][INFO ][discovery ] [Tempest]
vsti/jwJZAL5dQSOM9eRITJmYpQ
[2011-07-28 21:55:08,223][INFO ][http ] [Tempest]
bound_address {inet[/192.168.11.124:14000]}, publish_address {inet[/
192.168.11.124:14000]}
[2011-07-28 21:55:08,223][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: started

=== End Output ===

Note the joining of the cluster that is already running. I don't want
it to do that. How do I configure the second cluster?

Below is my elasticsearch.yaml file. Note: The cluster name is
different from the cluster name of the first instance:

=== Start Configuration ===

The cluster name

cluster:
name: inst2-vsti

Path Settings

path.conf: /opt/elasticsearch/inst2-config/elasticsearch.yml
path.data: /opt/elasticsearch/data-iscsi
path.work: /opt/elasticsearch/inst2-work
path.logs: /opt/elasticsearch/inst2-logs

network:
host: 192.168.11.124

=== End Configuration ===

Your help is appreciated.

Ed Brown


(David Pilato) #2

When I launch multiple instances on the same node, I use two differents ES installations :

One in /es1
Second in /es2

So I'm really sure that data dirs are not shared.

I'm wondering if you use elasticsearch.yaml or elasticsearch.yml for your second config file.

I think that your second instance doesn't read your second config file and have the default cluster name.

When you connect to second node with curl, what cluster name does it show ?

David :wink:

Le 29 juil. 2011 à 04:27, Ed Brown VSTI edbrownvsti@gmail.com a écrit :

I'm investigating Elasticsearch and would like to run multiple
Elasticsearch clusters on one host.

The first cluster is started up using the default setting except for
memory minimum and maxium.

The second cluster, which I don't want to join the first cluster, is
started with the command line:

./bin/elasticsearch -f -Des.http.port=14000 -
Des.transport.tcp.port=9400 -Dpath.conf=./inst2-config/
elasticsearch.yml

The output is as follows:

=== Start Output ===

[2011-07-28 21:55:01,265][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initializing ...
[2011-07-28 21:55:01,274][INFO ][plugins ] [Tempest]
loaded [], sites []
[2011-07-28 21:55:03,992][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initialized
[2011-07-28 21:55:03,993][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: starting ...
[2011-07-28 21:55:04,247][INFO ][transport ] [Tempest]
bound_address {inet[/192.168.11.124:9400]}, publish_address {inet[/
192.168.11.124:9400]}
[2011-07-28 21:55:07,517][INFO ][cluster.service ] [Tempest]
detected_master [Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]], added {[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]],[Leonus][havEfAcSTD-IITC1nJZ7qw][inet[/
192.168.11.124:9301]],}, reason: zen-disco-receive(from master
[[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/192.168.11.124:9300]]])
[2011-07-28 21:55:08,214][INFO ][discovery ] [Tempest]
vsti/jwJZAL5dQSOM9eRITJmYpQ
[2011-07-28 21:55:08,223][INFO ][http ] [Tempest]
bound_address {inet[/192.168.11.124:14000]}, publish_address {inet[/
192.168.11.124:14000]}
[2011-07-28 21:55:08,223][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: started

=== End Output ===

Note the joining of the cluster that is already running. I don't want
it to do that. How do I configure the second cluster?

Below is my elasticsearch.yaml file. Note: The cluster name is
different from the cluster name of the first instance:

=== Start Configuration ===

The cluster name

cluster:
name: inst2-vsti

Path Settings

path.conf: /opt/elasticsearch/inst2-config/elasticsearch.yml
path.data: /opt/elasticsearch/data-iscsi
path.work: /opt/elasticsearch/inst2-work
path.logs: /opt/elasticsearch/inst2-logs

network:
host: 192.168.11.124

=== End Configuration ===

Your help is appreciated.

Ed Brown


(Shay Banon) #3

You need to set different cluster names for the different clusters, so they
won't join. Also, if you have a close look at the data directory, you will
see that the first directory created is the cluster name, and under it the
data for that cluster is stored.

On Fri, Jul 29, 2011 at 5:27 AM, Ed Brown VSTI edbrownvsti@gmail.comwrote:

I'm investigating Elasticsearch and would like to run multiple
Elasticsearch clusters on one host.

The first cluster is started up using the default setting except for
memory minimum and maxium.

The second cluster, which I don't want to join the first cluster, is
started with the command line:

./bin/elasticsearch -f -Des.http.port=14000 -
Des.transport.tcp.port=9400 -Dpath.conf=./inst2-config/
elasticsearch.yml

The output is as follows:

=== Start Output ===

[2011-07-28 21:55:01,265][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initializing ...
[2011-07-28 21:55:01,274][INFO ][plugins ] [Tempest]
loaded [], sites []
[2011-07-28 21:55:03,992][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initialized
[2011-07-28 21:55:03,993][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: starting ...
[2011-07-28 21:55:04,247][INFO ][transport ] [Tempest]
bound_address {inet[/192.168.11.124:9400]}, publish_address {inet[/
192.168.11.124:9400]}
[2011-07-28 21:55:07,517][INFO ][cluster.service ] [Tempest]
detected_master [Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]], added {[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]],[Leonus][havEfAcSTD-IITC1nJZ7qw][inet[/
192.168.11.124:9301]],}, reason: zen-disco-receive(from master
[[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/192.168.11.124:9300]]])
[2011-07-28 21:55:08,214][INFO ][discovery ] [Tempest]
vsti/jwJZAL5dQSOM9eRITJmYpQ
[2011-07-28 21:55:08,223][INFO ][http ] [Tempest]
bound_address {inet[/192.168.11.124:14000]}, publish_address {inet[/
192.168.11.124:14000]}
[2011-07-28 21:55:08,223][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: started

=== End Output ===

Note the joining of the cluster that is already running. I don't want
it to do that. How do I configure the second cluster?

Below is my elasticsearch.yaml file. Note: The cluster name is
different from the cluster name of the first instance:

=== Start Configuration ===

The cluster name

cluster:
name: inst2-vsti

Path Settings

path.conf: /opt/elasticsearch/inst2-config/elasticsearch.yml
path.data: /opt/elasticsearch/data-iscsi
path.work: /opt/elasticsearch/inst2-work
path.logs: /opt/elasticsearch/inst2-logs

network:
host: 192.168.11.124

=== End Configuration ===

Your help is appreciated.

Ed Brown


(Ed Brown VSTI) #4

On Jul 29, 2:25 am, Shay Banon kim...@gmail.com wrote:

You need to set different cluster names for the different clusters, so they
won't join.

I definitely have different cluster names.

Also, if you have a close look at the data directory, you will
see that the first directory created is the cluster name, and under it the
data for that cluster is stored.

The appropriate data directories were used.

I tried creating a second instance from a second installation of
Elasticsearch and it worked. I don't have the time to investigate
further, but I'll come back to it.

On Fri, Jul 29, 2011 at 5:27 AM, Ed Brown VSTI edbrownv...@gmail.comwrote:

I'm investigating Elasticsearch and would like to run multiple
Elasticsearch clusters on one host.

The first cluster is started up using the default setting except for
memory minimum and maxium.

The second cluster, which I don't want to join the first cluster, is
started with the command line:

./bin/elasticsearch -f -Des.http.port=14000 -
Des.transport.tcp.port=9400 -Dpath.conf=./inst2-config/
elasticsearch.yml

The output is as follows:

=== Start Output ===

[2011-07-28 21:55:01,265][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initializing ...
[2011-07-28 21:55:01,274][INFO ][plugins ] [Tempest]
loaded [], sites []
[2011-07-28 21:55:03,992][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initialized
[2011-07-28 21:55:03,993][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: starting ...
[2011-07-28 21:55:04,247][INFO ][transport ] [Tempest]
bound_address {inet[/192.168.11.124:9400]}, publish_address {inet[/
192.168.11.124:9400]}
[2011-07-28 21:55:07,517][INFO ][cluster.service ] [Tempest]
detected_master [Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]], added {[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]],[Leonus][havEfAcSTD-IITC1nJZ7qw][inet[/
192.168.11.124:9301]],}, reason: zen-disco-receive(from master
[[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/192.168.11.124:9300]]])
[2011-07-28 21:55:08,214][INFO ][discovery ] [Tempest]
vsti/jwJZAL5dQSOM9eRITJmYpQ
[2011-07-28 21:55:08,223][INFO ][http ] [Tempest]
bound_address {inet[/192.168.11.124:14000]}, publish_address {inet[/
192.168.11.124:14000]}
[2011-07-28 21:55:08,223][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: started

=== End Output ===

Note the joining of the cluster that is already running. I don't want
it to do that. How do I configure the second cluster?

Below is my elasticsearch.yaml file. Note: The cluster name is
different from the cluster name of the first instance:

=== Start Configuration ===

The cluster name

cluster:
name: inst2-vsti

Path Settings

path.conf: /opt/elasticsearch/inst2-config/elasticsearch.yml
path.data: /opt/elasticsearch/data-iscsi
path.work: /opt/elasticsearch/inst2-work
path.logs: /opt/elasticsearch/inst2-logs

network:
host: 192.168.11.124

=== End Configuration ===

Your help is appreciated.

Ed Brown- Hide quoted text -

  • Show quoted text -

(Ed Brown VSTI) #5

On Jul 29, 12:12 am, David Pilato da...@pilato.fr wrote:

When I launch multiple instances on the same node, I use two differents ES installations :

One in /es1
Second in /es2

That's what I just did and it worked. Thanks. I'll come back to my
original problem when I have more time.

So I'm really sure that data dirs are not shared.

I'm wondering if you use elasticsearch.yaml or elasticsearch.yml for your second config file.

I think that your second instance doesn't read your second config file and have the default cluster name.

When you connect to second node with curl, what cluster name does it show ?

David :wink:

Le 29 juil. 2011 à 04:27, Ed Brown VSTI edbrownv...@gmail.com a écrit :

I'm investigating Elasticsearch and would like to run multiple
Elasticsearch clusters on one host.

The first cluster is started up using the default setting except for
memory minimum and maxium.

The second cluster, which I don't want to join the first cluster, is
started with the command line:

./bin/elasticsearch -f -Des.http.port=14000 -
Des.transport.tcp.port=9400 -Dpath.conf=./inst2-config/
elasticsearch.yml

The output is as follows:

=== Start Output ===

[2011-07-28 21:55:01,265][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initializing ...
[2011-07-28 21:55:01,274][INFO ][plugins ] [Tempest]
loaded [], sites []
[2011-07-28 21:55:03,992][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initialized
[2011-07-28 21:55:03,993][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: starting ...
[2011-07-28 21:55:04,247][INFO ][transport ] [Tempest]
bound_address {inet[/192.168.11.124:9400]}, publish_address {inet[/
192.168.11.124:9400]}
[2011-07-28 21:55:07,517][INFO ][cluster.service ] [Tempest]
detected_master [Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]], added {[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]],[Leonus][havEfAcSTD-IITC1nJZ7qw][inet[/
192.168.11.124:9301]],}, reason: zen-disco-receive(from master
[[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/192.168.11.124:9300]]])
[2011-07-28 21:55:08,214][INFO ][discovery ] [Tempest]
vsti/jwJZAL5dQSOM9eRITJmYpQ
[2011-07-28 21:55:08,223][INFO ][http ] [Tempest]
bound_address {inet[/192.168.11.124:14000]}, publish_address {inet[/
192.168.11.124:14000]}
[2011-07-28 21:55:08,223][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: started

=== End Output ===

Note the joining of the cluster that is already running. I don't want
it to do that. How do I configure the second cluster?

Below is my elasticsearch.yaml file. Note: The cluster name is
different from the cluster name of the first instance:

=== Start Configuration ===

The cluster name

cluster:
name: inst2-vsti

Path Settings

path.conf: /opt/elasticsearch/inst2-config/elasticsearch.yml
path.data: /opt/elasticsearch/data-iscsi
path.work: /opt/elasticsearch/inst2-work
path.logs: /opt/elasticsearch/inst2-logs

network:
host: 192.168.11.124

=== End Configuration ===

Your help is appreciated.

Ed Brown- Hide quoted text -

  • Show quoted text -

(Shay Banon) #6

I think it ended up using the same configuration file. When elasticsearch
starts up, it prints the cluster name it belongs to, for example:

[2011-07-28 21:55:08,214][INFO ][discovery ] [Tempest]
vsti/jwJZAL5dQSOM9eRITJmYpQ

On Fri, Jul 29, 2011 at 5:42 PM, Ed Brown VSTI edbrownvsti@gmail.comwrote:

On Jul 29, 2:25 am, Shay Banon kim...@gmail.com wrote:

You need to set different cluster names for the different clusters, so
they
won't join.

I definitely have different cluster names.

Also, if you have a close look at the data directory, you will
see that the first directory created is the cluster name, and under it
the
data for that cluster is stored.

The appropriate data directories were used.

I tried creating a second instance from a second installation of
Elasticsearch and it worked. I don't have the time to investigate
further, but I'll come back to it.

On Fri, Jul 29, 2011 at 5:27 AM, Ed Brown VSTI <edbrownv...@gmail.com
wrote:

I'm investigating Elasticsearch and would like to run multiple
Elasticsearch clusters on one host.

The first cluster is started up using the default setting except for
memory minimum and maxium.

The second cluster, which I don't want to join the first cluster, is
started with the command line:

./bin/elasticsearch -f -Des.http.port=14000 -
Des.transport.tcp.port=9400 -Dpath.conf=./inst2-config/
elasticsearch.yml

The output is as follows:

=== Start Output ===

[2011-07-28 21:55:01,265][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initializing ...
[2011-07-28 21:55:01,274][INFO ][plugins ] [Tempest]
loaded [], sites []
[2011-07-28 21:55:03,992][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: initialized
[2011-07-28 21:55:03,993][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: starting ...
[2011-07-28 21:55:04,247][INFO ][transport ] [Tempest]
bound_address {inet[/192.168.11.124:9400]}, publish_address {inet[/
192.168.11.124:9400]}
[2011-07-28 21:55:07,517][INFO ][cluster.service ] [Tempest]
detected_master [Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]], added {[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/
192.168.11.124:9300]],[Leonus][havEfAcSTD-IITC1nJZ7qw][inet[/
192.168.11.124:9301]],}, reason: zen-disco-receive(from master
[[Optoman][F6i3jzo7QhG1Z2ryUemsMg][inet[/192.168.11.124:9300]]])
[2011-07-28 21:55:08,214][INFO ][discovery ] [Tempest]
vsti/jwJZAL5dQSOM9eRITJmYpQ
[2011-07-28 21:55:08,223][INFO ][http ] [Tempest]
bound_address {inet[/192.168.11.124:14000]}, publish_address {inet[/
192.168.11.124:14000]}
[2011-07-28 21:55:08,223][INFO ][node ] [Tempest]
{elasticsearch/0.17.1}[9478]: started

=== End Output ===

Note the joining of the cluster that is already running. I don't want
it to do that. How do I configure the second cluster?

Below is my elasticsearch.yaml file. Note: The cluster name is
different from the cluster name of the first instance:

=== Start Configuration ===

The cluster name

cluster:
name: inst2-vsti

Path Settings

path.conf: /opt/elasticsearch/inst2-config/elasticsearch.yml
path.data: /opt/elasticsearch/data-iscsi
path.work: /opt/elasticsearch/inst2-work
path.logs: /opt/elasticsearch/inst2-logs

network:
host: 192.168.11.124

=== End Configuration ===

Your help is appreciated.

Ed Brown- Hide quoted text -

  • Show quoted text -

(system) #7