ElasticSearch启动报错,bootstrap chec
2019-07-22 本文已影响0人
Liuzz25
问题描述
修改elasticsearch.yml配置文件,允许外网访问时。
vim config/elasticsearch.yml
增加
network.host: 0.0.0.0
启动失败,检查没有通过,报错:
"""
ERROR: [2] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
"""
解决方法
修改elasticsearch.yml配置文件,在Discovery栏下加上“cluster.initial_master_nodes: ["node-1"]”,重启elasticsearch即可。如下所示:
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["node-1"]