我在最新版本的Elasticsearch 5.6.3中遇到同样的错误
Error: encountered environment variables that are no longer supported
Use jvm.options or ES_JAVA_OPTS to configure the JVM
ES_HEAP_SIZE=1024m: set -Xms1024m and -Xmx1024m in jvm.options or add "-
Xms1024m -Xmx1024m" to ES_JAVA_OPTS
我试图在bin / elasticsearch中添加ES_JAVA_OPTS =" -Xms1024m -Xmx1024m,但我得到同样的东西。
答案 0 :(得分:1)
您需要仔细阅读错误消息。
解决方案1:打开$ES_HOME/config/jvm.options
并修改以-Xms
和-Xmx
-Xms1024m
-Xmx1024m
或解决方案2:在启动Elasticsearch之前使用环境变量
> export ES_JAVA_OPTS="-Xms1024m -Xmx1024m"
> bin/elasticsearch