elasticsearch排错指南(各种错误~)

博主在学习es的时候,遇到了很多错误,这里列举安装时的错误。

一、can not run elasticsearch as root


如上图,代表不能使用root用户运行es,这是es的开发团队考虑到了安全性所做的设置

解决方案:

    新建用户,使用新建的用户安装即可,敲击如下命令(其中yf为用户名,各位可以自己设定,su即切换用户)

    adduser yf

    su yf


二、unable to install syscall filter


bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks 
ERROR: [1] bootstrap checks failed... 
[1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

 如上图和代码,都有可能出现。首先,图片出现的是警告,代码是错误。

解决方案:

bootstrap.system_call_filter: false

    在配置文件elasticsearch.yml中追加即可

扫描二维码关注公众号,回复: 1447984 查看本文章

三、Cannot allocate memory


如上两个图,第一张图是内存不够的报错信息,第二张图的问题是启动就被杀死了,其实都是一个问题,内存不够。

解决方案:

    在 config/jvm.options文件下,修改以下两个参数

    

    博主已经被逼到200了,就差50了~

四、结尾

最后说一句,在安装elasticsearch是,最好先运行以下脚本,这样可以避免很多坑,参数是啥意思百度上面都有详细解说。

#!/bin/bash 
echo "* soft nofile 65536" >> /etc/security/limits.conf 
echo "* hard nofile 65536" >> /etc/security/limits.conf 
echo "* soft memlock unlimited" >> /etc/security/limits.conf 
echo "* hard memlock unlimited" >> /etc/security/limits.conf 
echo "vm.max_map_count = 262144" >> /etc/sysctl.conf 
sysctl -p 
ulimit -l unlimited

感觉错误都来照顾了我一遍,哈哈

好啦~希望这篇文章可以给大家提供帮助。

猜你喜欢

转载自blog.csdn.net/a735834365/article/details/79880289