docker安装elasticsearch的坑,ERROR: [1] bootstrap checks failed [1]: the default discovery setting are...

情况一

ERROR: [1] bootstrap checks failed
[1]: 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

解决方案:

1.找到elasticsearch.yml文件

find / -name elasticsearch.yml

2.往yml文件中添加下面的配置
node.name: node-1
cluster.initial_master_nodes: [“node-1”]

情况二

max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决方案:

1.切换到root用户执行命令:

sysctl -w vm.max_map_count=262144

2.查看结果:

sysctl -a|grep vm.max_map_count

显示:

vm.max_map_count = 262144
  1. 上述方法修改之后,如果重启虚拟机将失效,解决办法:
    在 /etc/sysctl.conf文件最后添加一行
    vm.max_map_count=262144
    即可永久修改

欢迎扫码入群交流
docker安装elasticsearch的坑,ERROR: [1] bootstrap checks failed [1]: the default discovery setting are..._第1张图片

你可能感兴趣的:(杂)