elasticsearch将无法启动,因为它无法找到java 8

时间:2017-05-24 21:55:03

标签: java elasticsearch java-8

我正在尝试在ubuntu机器上运行elasticsearch版本1.8的实例。 当我获得弹性搜索时:

es@ubuntu-mwa-flask:/root/elasticsearch-5.4.0$ ./bin/elasticsearch
Error: Could not find or load main class org.elasticsearch.tools.JavaVersionChecker
Elasticsearch requires at least Java 8 but your Java version from /usr/bin/java does not meet this requirement

我已经检查了我的java版本:

es@ubuntu-mwa-flask:/root/elasticsearch-5.4.0$ java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

我做错了什么?我以前在afew机器上安装了elasticsearch,为什么这个不起作用?

edit1:因为有人问:

es@ubuntu-mwa-flask:/root/elasticsearch-5.4.0$ /usr/bin/java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
mixed mode)

EDIT2:

es@ubuntu-mwa-flask:/root/elasticsearch-5.4.0$ javac -version
javac 1.8.0_131

1 个答案:

答案 0 :(得分:-1)

可能您没有正确的权限。尝试将它们设置为774并再次检查:

sudo chmod 774 -R elasticsearch-6.3.2/