ElasticSearch5.X启动不起来问题及解决,mark
- requires kernel 3.5+ with CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER
centos6.x的内核太低,需要centos7或者升级centos6.x对应的内核至3.5以上。这里选择升级centos6.x对应的内核。
- 查看内核:
执行more /etc/issue和uname -a查看linux内核信息
可以看到内核信息太低,只有2.6左右,需要做升级。
- 升级
- 导入public key
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
有如下错误:
无法在服务器使用curl命令访问https域名,原因是nss版本有点旧了,yum -y update nss更新一下,重新curl即可!
- 安装ELRepo到CentOS
可以去http://elrepo.org/tiki/tiki-index.php 选择要安装的ELRepo。
一般会安装到最新版内核
~]$ sudo rpm -Uvh https://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm
~]$ sudo yum --enablerepo=elrepo-kernel install kernel-lt -y
- 编辑grub.conf文件,修改Grub引导顺序
sudo vim /etc/grub.conf
因为一般新安装的内核在第一个位置,所以设置default=0,表示启动新内核
重启之后查看linux内核
搞定!
- max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
编辑limits.conf 添加类似如下内容
sudo vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
- max number of threads [1024] for user [bigdata] is too low, increase to at least [4096]
进入/etc/security/limits.d/目录下修改配置文件90-nproc.conf
- max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
修改配置文件/etc/sysctl.conf
添加如下内容:vm.max_map_count = 262144
生效:~]$ sudo sysctl -p
- system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
这是在因为Centos6不支持SecComp,而ES5.2.0默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。
在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
重启电脑!