1

I'm trying to implement a 2 node ES cluster using Amazon EC2 instances. After everything is setup and I try to start the ES, it fails to start. Below are the config files:

/etc/elasticsearch/elasticsearch.yml - http://pastebin.com/3Q1qNqmZ

/etc/init.d/elasticsearch - http://pastebin.com/f3aJyurR

Below are the /var/log/elasticsearch/es-cluster.log content -

[2014-06-08 07:06:01,761][WARN ][common.jna               ] Unknown mlockall error 0
[2014-06-08 07:06:02,095][INFO ][node                     ] [logstash] version[0.90.13], pid[29666], build[249c9c5/2014-03-25T15:27:12Z]
[2014-06-08 07:06:02,095][INFO ][node                     ] [logstash] initializing ...
[2014-06-08 07:06:02,108][INFO ][plugins                  ] [logstash] loaded [], sites []
[2014-06-08 07:06:07,504][INFO ][node                     ] [logstash] initialized
[2014-06-08 07:06:07,510][INFO ][node                     ] [logstash] starting ...
[2014-06-08 07:06:07,646][INFO ][transport                ] [logstash] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.164.27.207:9300]}
[2014-06-08 07:06:12,177][INFO ][cluster.service          ] [logstash] new_master [logstash][vCS_3LzESEKSN-thhGWeGA][inet[/<an_ip_is_here>:9300]], reason: zen-disco-join (elected_as_master)
[2014-06-08 07:06:12,208][INFO ][discovery                ] [logstash] es-cluster/vCS_3LzESEKSN-thhGWeGA
[2014-06-08 07:06:12,334][INFO ][http                     ] [logstash] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/<an_ip_is_here>:9200]}
[2014-06-08 07:06:12,335][INFO ][node                     ] [logstash] started
[2014-06-08 07:06:12,379][INFO ][gateway                  ] [logstash] recovered [0] indices into cluster_state
theharshest
  • 7,767
  • 11
  • 41
  • 51
  • you say you have 2 nodes on ec2 instances but I only see 1 config file and 1 log output - can you share the config and log output for the 2nd node too? – John Petrone Jun 08 '14 at 15:44
  • @JohnPetrone second is exactly the same because the created the two setups using ansible. – theharshest Jun 08 '14 at 16:16

1 Answers1

2

I see several things that you should correct in your configuration files.

1) Need different node names. You are using the same config file for both nodes. You do not want to do this if you are setting node name like you are: node.name: "logstash". Either create separate configuration files with different node.name entries or comment it out and let ES auto assign the node.name.

2) Mlockall setting is throwing an error. I would not start out setting bootstrap.mlockall: True until you've first gotten ES to run without it and then have spent a little time configuring linux to support it. It can cause problems with booting up:

Warning

mlockall might cause the JVM or shell session to exit if it tries to allocate more memory than is available!

I'd check out the documentation on the configuration variables and be careful about making too many adjustments right out of the gate.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-configuration.html http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-service.html

If you do want to make memory adjustments to ES this previous stackoverflow article should be helpful:

How to change Elasticsearch max memory size

Community
  • 1
  • 1
John Petrone
  • 26,943
  • 6
  • 63
  • 68