Hi,
I am Trying to Run Elasticsearch 6.2.4 on OpenJdk 9,
But when ever i try to start elasticsearch, i get the below error,
May 09 06:37:03 ip-172-31-48-228 systemd[1]: Started Elasticsearch.
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: [2018-05-09T06:37:09,837][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [universal-spot-939345] fatal error in thread [main], exiting
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: java.lang.NoSuchMethodError: java.lang.ProcessHandle.pid()J
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.monitor.jvm.JvmPid.getPid(JvmPid.java:27) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.monitor.jvm.JvmInfo.(JvmInfo.java:153) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.bootstrap.Bootstrap.initializeProbes(Bootstrap.java:160) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:179) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.4.jar:6.2.4]
May 09 06:37:09 ip-172-31-48-228 elasticsearch[11621]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.4.jar:6.2.4]
[2018-05-09T07:21:57,896][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [universal-spot-939345] fatal error in thread [main], exiting
java.lang.NoSuchMethodError: java.lang.ProcessHandle.pid()J
at org.elasticsearch.monitor.jvm.JvmPid.getPid(JvmPid.java:27) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.monitor.jvm.JvmInfo.<clinit>(JvmInfo.java:153) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.initializeProbes(Bootstrap.java:160) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:179) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:323) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) ~[elasticsearch-6.2.4.jar:6.2.4]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:85) ~[elasticsearch-6.2.4.jar:6.2.4]
That looks like a pre-release, internal build of JDK9
Java 9 was officially released in September 2017, and it looks like you have a build from April 2016.
You'll need to get a more recent, supported release of Java 9 (or Java 8).
Thanks,
Initially i installed jdk 9 using apt install openjdk-9-jdk, which was installing the above version.
after i manually installed jdk 9+181, I am able to run ES.
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.