Elasticsearch java 8 check fail

Hi,

I'm trying to run elasticsearch on my mac but it fails due to java version incompatibility.
The thing is that I have the latest version of Java installed on my system ( 8 Update 144 ) but I keep getting this error when starting the elasticsearch server:

Elasticsearch requires at least Java 8 but your Java version from /usr/bin/java does not meet this requirement

Any ideas how to solve this?
Thanks.

Hi,
can you try out what is the output of

/usr/bin/java -version

What your system ? Which distribution ?

/usr/bin/java -version
OUTPUT: Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

Mac OS 10.12.6

Ok, then elastic check ist working well.

reboot ? And make sure rigth java version is on be path

reboot did not fix the problem. Error persists

You're trying to use JDK 6 to start Elasticsearch, and the output message makes clear that we require JDK 8. You need to set JAVA_HOME to point to your JDK 8 installation. Right now you either do not have that set and the first one in the path is being picked up which appears to be a JDK 6 installation, or you have it set and pointing to JDK 6. Either way, please point JAVA_HOME to JDK 8.

Hi @Cristian_Jadox,

Where did u installed Java8 ?
Default ?
I don't have my mac here ... just try out :

OK, I upgraded JDK from 6 to 8. but now I have another problem:

[2017-08-21T17:27:46,971][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to initialize modules
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.5.0.jar:5.5.0]
Caused by: java.lang.IllegalStateException: Unable to initialize modules
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:123) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.node.Node.(Node.java:312) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.node.Node.(Node.java:244) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:232) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:232) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:351) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.5.0.jar:5.5.0]
... 6 more
Caused by: java.nio.file.FileSystemException: /Users/abc/Downloads/elasticsearch-5.5.0/modules/.DS_Store/plugin-descriptor.properties: Not a directory
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_144]
at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_144]
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:1.8.0_144]
at java.nio.file.Files.newInputStream(Files.java:152) ~[?:1.8.0_144]
at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:114) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.plugins.PluginsService.getModuleBundles(PluginsService.java:273) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:117) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.node.Node.(Node.java:312) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.node.Node.(Node.java:244) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:232) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:232) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:351) ~[elasticsearch-5.5.0.jar:5.5.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-5.5.0.jar:5.5.0]
... 6 more

Got it to work.

I just had to delete the '.DS_Store' file from /modules

Those are put there if you browse the directory through Finder.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.