elasticsearch异常

1  es7在centOS6启动报错

java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed

原因:  因为Centos6不支持SecComp,而ES默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动解决:修改elasticsearch.yml 添加一下内容 :

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

 

future versions of Elasticsearch will require Java 11; your Java version from [/app/jdk1.8.0_201/jre] does not meet this requirement

原因:Elasticsearch该版本内置了JDK,而内置的JDK是当前推荐的JDK版本。当然如果你本地配置了JAVA_HOME那么ES就是优先使用配置的JDK启动ES

解决:启动脚本添加环境变量
vi /app/elasticsearch/bin/elasticsearch

# 添加ES自带的jdk环境变量
export JAVA_HOME=/app/elasticsearch/jdk
export PATH=$JAVA_HOME/bin:$PATH

 

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

解决:jvm.option注释原来的“-XX:+UseConcMarkSweepGC”,添加“-XX:+UseG1GC”

#-XX:+UseConcMarkSweepGC
-XX:+UseG1GC

 

[2019-11-15T09:56:59,038][WARN ][o.e.b.BootstrapChecks    ] [cnsz17pl5684] 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

sysctl -p

[2019-11-15T10:02:08,394][WARN ][o.e.b.BootstrapChecks    ] [cnsz17pl5684] the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured

解决:修改elasticsearch.yml,取消注释保留一个节点

cluster.initial_master_nodes: ["node-1"]
发布了20 篇原创文章 · 获赞 1 · 访问量 2897

猜你喜欢

转载自blog.csdn.net/linwenhai2018/article/details/103079033
今日推荐