amazon-ec2 - Elasticsearch无法启动

标签 amazon-ec2 elasticsearch

我正在尝试使用Amazon EC2实例实现2节点ES集群。一切设置完成后,我尝试启动ES,但无法启动。以下是配置文件:

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

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

以下是/var/log/elasticsearch/es-cluster.log内容-

[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

最佳答案

我在配置文件中看到了一些应纠正的问题。

1)需要不同的节点名称。您正在两个节点上使用相同的配置文件。如果要像设置node.name: "logstash"这样设置节点名称,则不想执行此操作。使用不同的node.name条目创建单独的配置文件,或者将其注释掉,然后让ES自动分配node.name。

2)Mlockall设置抛出错误。在您首先让ES在没有它的情况下运行,然后花了一些时间配置linux以支持它之前,我不会开始设置bootstrap.mlockall: True。它可能会导致启动问题:

Warning

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



我会查看有关配置变量的文档,并小心进行过多的调整。

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

如果您确实想对ES进行内存调整,则此上一篇stackoverflow文章应该会有所帮助:

How to change Elasticsearch max memory size

关于amazon-ec2 - Elasticsearch无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24104031/

相关文章:

ruby-on-rails - 从ElasticSearch聚合中排除零值

amazon-web-services - 如何将 Drupal 站点迁移到 Amazon Web Services EC2?

elasticsearch 阻止使用 PostMan 插入数据

amazon-web-services - 使用 CloudFormation 设置公共(public) IP

ubuntu - 无法将用户数据传递到 ec2 ubuntu 实例

amazon-web-services - 使用 aws cli 将日志流式传输到 elastic

elasticsearch - 在bbox中获取前N个加权GPS点

database - 像Google一样在Elastic Search中进行智能搜索

amazon-ec2 - 使用 Ansible 在 AWS 中创建 VPC

linux - 无法调整 AWS EC2 卷的大小