这些是启动时会出的常见问题
解决办法:
[root@chenxi elasticsearch]# vim /etc/sysctl.conf
在文件末尾追加:vm.max_map_count=655360
保存后执行
[root@chenxi elasticsearch]# sysctl -p
解决办法:
[root@chenxi elasticsearch]# vim /etc/security/limits.conf
65535修改为65536
- soft nofile 65536
- hard nofile 65536
文件末尾追加
- soft nproc 4096
- hard nproc 4096
修改文件后保存并“关闭会话,重新登陆服务器”
解决办法:
##在elasticsearch.yml添加配置项
[root@chenxi elasticsearch]# vim config/elasticsearch.yml
--------------------------------- 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”]
解决办法:
##在elasticsearch.yml修改并添加配置项
[root@chenxi elasticsearch]# vim config/elasticsearch.yml
取消注释并设置值为false
bootstrap.memory_lock: false
追加配置项
bootstrap.system_call_filter: false