warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOMEFuture versions of Elasticsearch will require Java 11; your Java version from [/usr/local/jdk1.8.0_291/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
解决办法:进入bin目录,修改elasticsearch配置
cd /usr/local/elasticsearch-8.17.0/bin/
vim ./elasticsearch#将jdk修改为es中自带jdk的配置目录export JAVA_HOME=/usr/local/elasticsearch-8.17.0/jdkexport PATH=$JAVA_HOME/bin:$PATHif [ -x "$JAVA_HOME/bin/java" ]; thenJAVA="/usr/local/elasticsearch-8.17.0/jdk/bin/java"elseJAVA=which javafi