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
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.
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
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.