Setting up elasticsearch.yml for Discovery

Greetings for Norway!

Question for the kind folks, I am a new to ES. I am using RHEL

Here is my YML file... I have two nodes, but when they startup they are not seeing each other, and electing themselves as masters. What am I missing?

.../elasticsearch.yml

name: (IP address of node)

Cluster Settings

cluster:
name: _Cluster

Gateway Settings

#gateway:

recover_after_nodes: 1

recover_after_time: 5m

xpected_nodes: 2

network:
host: x.x.x.163 # IP address of your server

discovery:
zen:
ping:
multicast:
enabled: false
unicast:
hosts:["x.x.x.163:9300","x.x.x.166:9301"]

transport:
tcp:
port: 9300

<---end of file-->

I have the service wrapper installed/configured, but I start the servers up with the #./elasticsearch/bin/elasticsearch -f so I can see how it starts up.

Any tips or things I am missing? Thanks !

I would bet this is a port problem.
Aren't your 2 instances listening on the same port 9300, whereas you try to
reach the second one through the port 9301?

Pardon me if I'm saying nonsense, I am new to ES as well.

Olivier @Yakaz

2011/4/28 Thor [via Elasticsearch Users] <
ml-node+2875050-61290776-393975@n3.nabble.com>

Greetings for Norway!

Question for the kind folks, I am a new to ES. I am using RHEL

Here is my YML file... I have two nodes, but when they startup they are not
seeing each other, and electing themselves as masters. What am I missing?

.../elasticsearch.yml

name: (IP address of node)

Cluster Settings

cluster:
name: _Cluster

Gateway Settings

#gateway:

recover_after_nodes: 1

recover_after_time: 5m

xpected_nodes: 2

network:
host: x.x.x.163 # IP address of your server

discovery:
zen:
ping:
multicast:
enabled: false
unicast:
hosts:["x.x.x.163:9300","x.x.x.166:9301"]

transport:
tcp:
port: 9300

<---end of file-->

I have the service wrapper installed/configured, but I start the servers up
with the #./elasticsearch/bin/elasticsearch -f so I can see how it starts
up.

Any tips or things I am missing? Thanks !


If you reply to this email, your message will be added to the discussion
below:

http://elasticsearch-users.115913.n3.nabble.com/Setting-up-elasticsearch-yml-for-Discovery-tp2875050p2875050.html
To start a new topic under Elasticsearch Users, email
ml-node+115913-1699315842-393975@n3.nabble.com
To unsubscribe from Elasticsearch Users, click herehttp://elasticsearch-users.115913.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=115913&code=b2xpdmllckB5YWthei5jb218MTE1OTEzfDIxMjI2MTYwOTc=.

I totally disabled my firewall to check if it was a firewall/port problem and still getting the same problem... maybe I am setting my ports up wrong in the YML file?

Ahhhhh, I did not understand what you were saying... but now yes, I changed everything to :9300 and it finds them all now nicely!! Thanks!

Just a note, you don't have to specify the port (its optional). You can just specify the host name, and the port will be derived based on the (current node) transport settings (which default to 9300).
On Thursday, April 28, 2011 at 8:01 PM, Thor wrote:

Ahhhhh, I did not understand what you were saying... but now yes, I changed
everything to :9300 and it finds them all now nicely!! Thanks!

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/Setting-up-elasticsearch-yml-for-Discovery-tp2875050p2875462.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

I'm trying to setup a two node cluster .. one acting as master and the other being an additional node that can act as master if the first node goes down ..

I have installed the 0.16.2 and everything appears to be running okay on a single node .. My configuration looks like this :

============

Cluster Settings

cluster:
name: elasticsearch

Gateway Settings

gateway:
recover_after_nodes: 1
recover_after_time: 5m
expected_nodes: 2

network:
host: x.184.167.54

Force all memory to be locked, forcing JVM to never swap

(make sure to set MIN and MAX mem to the same value)

#bootstrap:

mlockall: true

Unicast Discovery (disable multicast)

discovery:
zen:
multicast.enabled: false
unicast.hosts: ["x.184.167.54:9300", "x.182.149.181:9300"]

transport:
tcp:
port:9300

============

The ES server comes up well on .54 server.

How do I start ES on .181 server so that I can see .181 listed as an additional node ?

If I run the ES server from .181 server with the same configuration above, I get the following error :

[2011-06-29 07:39:06,191][ERROR][bootstrap ] [Force] {elasticsearch/0.16.2}: Startup Failed ...

  • BindTransportException[Failed to bind to [9300-9400]]
    ChannelException[Failed to bind to: /x.184.167.54:9400]
    BindException[Cannot assign requested address]

If I remove the network: host entry .. ES starts up properly, but is in a master mode ..

[2011-06-29 07:41:30,733][INFO ][cluster.service ] [Saxon, Samuel "Starr"] new_master [Saxon, Samuel "Starr"][bD-aa-VgSjev1URs7zCLvw][inet[/x.182.149.181:9300]], reason: zen-disco-join (elected_as_master)

=============

Is there anything that I'm missing in the configuration ? Where do I find the list of all parameters that can go into elasticsearch.yml

Regards, DKN

I could get this working when my nodes are in the same subnet. I am not sure why this design decision was made, as we anyways would specify the IP addresses of the nodes participating in the cluster. A multi-cast enabled configuration should have ideally honored two of my nodes sitting in two different continents ..

As of now, I have my two node cluster running with the above configuration .. without the "netowrk" settings specified in both the configurations.