新建普通用户启动报错:Error: Could not find or load main class org.elasticsearch.tools.JavaVersionChecker Elasticsearch requires at least Java 8 but your Java version from /usr/java/jdk1.8.0_112/bin/java does not meet this requirement
解决方法:将es放到admin目录下运行
运行发现报以下错误:
这是admin权限不够的导致,解决办法,将用户切换到root用户,退出到elasticseach-5.4.0的父目录,执行以下命令:
chown admin elasticsearch-5.4.0 -R
切换到admin用户启动es发现报以下错误:
原因: 因为Centos6不支持SecComp,而ES默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动解决:修改elasticsearch.yml 添加以下内容 :
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
配置集群后启动报以下错误:
问题一:ERROR: bootstrap checks failed
max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
max number of threads [1024] for user [lishang] likely too low, increase to at least [2048]
解决:切换到root用户,编辑limits.conf 添加类似如下内容
vi /etc/security/limits.conf
添加如下内容:
- soft nofile 65536
- hard nofile 131072
- soft nproc 2048
- hard nproc 4096
问题二:max number of threads [1024] for user [lish] likely too low, increase to at least [2048]
解决:切换到root用户,进入limits.d目录下修改配置文件。
vi /etc/security/limits.d/90-nproc.conf
修改如下内容:
- soft nproc 1024
修改为
- soft nproc 2048
问题三:max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
解决:切换到root用户修改配置sysctl.conf
vi /etc/sysctl.conf
添加下面配置:
vm.max_map_count=655360
并执行命令:
sysctl -p
然后,重新启动elasticsearch,即可启动成功。