启动elasticsearch时所发生的错误解决

1、内核过低  如下图:

启动elasticsearch时所发生的错误解决

如果使用的centos6 那报这个错误是肯定的。他的内核版本为2.6。而Elasticsearch的插件要求至少3.5以上版本

解决方案:将插件禁用即可

修改elasticsearch.yml文件,在最下面添加如下配置:

bootstrap.system_call_filter: false

2、文件权限不足 (这是由于我们没有使用root用户去操作所导致的)

 max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

解决方案:

首先切换回root用户:

然后修改配置文件:

vim /etc/security/limits.conf

添加下面的内容:

* soft nofile 65536

* hard nofile 131072

* soft nproc 4096

* hard nproc 4096

3、线程数不够

max number of threads [1024] for user [es] is too low, increase to at least [4096]

解决方案:

vim /etc/security/limits.d/90-nproc.conf

修改下面的内容:

* soft nproc 1024 改为 * soft nproc 4096

4、进程虚拟内存

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

vm.max_map_count:限制一个进程可以拥有的VMA(虚拟内存区域)的数量

修改配置文件

vim /etc/sysctl.conf  

#在sysctl.conf 添加如下内容

vm.max_map_count=655360

然后执行命令:

sysctl -p