Elasticsearch分布式集群部署启动报错(服务器配置)

需root权限下更改:


1、虚拟内存

1)更改配置文件 
/etc/sysctl.conf 增加 vm.max_map_count=262144

2)执行命令,使其生效
sysctl -p

3)运行命令验证
sysctl vm.max_map_count

2、设置文件句柄和最大线程数

1)更改配置文件

/etc/security/limits.conf 文件中添加以下内容


es soft nofile 65536
es hard nofile 65536
es soft nproc 168738
es hard nproc 168738


 
 3.内存锁定


 
1) 修改/etc/security/limits.conf文件内容
es soft memlock unlimited
es hard memlock unlimited

2)在/etc/systemd/system/elasticsearch.service.d目录下创建一个文件override.conf,并添加下列内容
[Service]
LimitMEMLOCK=infinity

3)最后重新载入配置文件更新服务
sudo systemctl daemon-reload

 

结语:

(最好的是研读官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/system-config.html)

Elasticsearch分布式集群部署启动报错(服务器配置)