#需要jdk11 版本
future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/jdk1.8.0_152/jre] does not meet this requirement
#解决
#安装kdk11
wget https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz
tar -xvf openjdk-11.0.1_linux-x64_bin.tar.gz -C /usr/local/
#配置
vim bin/elasticsearch
#配置自己的jdk11
export JAVA_HOME=/usr/local/jdk-11.0.1
export PATH=$JAVA_HOME/bin:$PATH
#添加jdk判断
if [ -x "$JAVA_HOME/bin/java" ]; then
JAVA="/usr/local/jdk-11.0.1/bin/java"
else
JAVA=`which java`
fi
#异常
Exception in thread "main" java.nio.file.AccessDeniedException: /opt/elasticsearch/config/jvm.options
#解决
#之后修改的没有授权
chown es. /opt/elasticsearch -R
#异常
[ERROR][o.e.b.Bootstrap ] [node2] node validation exception
[2] bootstrap checks failed
#解决
echo 'vm.max_map_count=655360' >> /etc/sysctl.conf
sysctl -p
reboot
#异常启动后不能加入集群
[WARN ][o.e.c.c.ClusterFormationFailureHelper] [node1] master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and this node must discover master-eligible nodes [192.168.10.251, 192.168.10.252, 192.168.10.253] to bootstrap a cluster: have discovered [{node1}{36Upvst-TYmu6W9C3OBvXg}{Kh8mKJNHT4aS-4JiyKVnfQ}{192.168.10.251}{192.168.10.251:9300}{dim}{ml.machine_memory=8202059776, xpack.installed=true, ml.max_open_jobs=20}]; discovery will continue using [127.0.0.1:9300, 127.0.0.1:9301, 127.0.0.1:9302, 127.0.0.1:9303, 127.0.0.1:9304, 127.0.0.1:9305, [::1]:9300, [::1]:9301, [::1]:9302, [::1]:9303, [::1]:9304, [::1]:9305] from hosts providers and [{node1}{36Upvst-TYmu6W9C3OBvXg}{Kh8mKJNHT4aS-4JiyKVnfQ}{192.168.10.251}{192.168.10.251:9300}{dim}{ml.machine_memory=8202059776, xpack.installed=true, ml.max_open_jobs=20}] from last-known cluster state; node term 0, last-accepted version 0 in term 0
#解决 添加参数
discovery.seed_hosts: