Re: ES 7.14.0 not compatible with Prometheus Exporter due to Java Version

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Wed, 18 Aug 2021 10:06:02 UTC
Hi,


> On 18 Aug 2021, at 12:02, Filias Heidt <fh@netzkommune.de> wrote:
> 
> Hi,
> 
> Elasticsearch 7 was bumped to 7.14.0 a few days ago (thanks btw!) and I tried installing https://github.com/vvanholl/elasticsearch-prometheus-exporter <https://github.com/vvanholl/elasticsearch-prometheus-exporter> <https://github.com/vvanholl/elasticsearch-prometheus-exporter <https://github.com/vvanholl/elasticsearch-prometheus-exporter>> in the correct version after updating.
> I get the following Error:
> Exception in thread "main" java.lang.IllegalStateException: prometheus-exporter requires Java 16:, your system: 8
> 	at org.elasticsearch.jdk.JarHell.checkJavaVersion(JarHell.java:245)
> 	at org.elasticsearch.plugins.PluginsService.verifyCompatibility(PluginsService.java:344)
> 	at org.elasticsearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:791)
> 	at org.elasticsearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:846)
> 	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:246)
> 	at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:216)
> 	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
> 	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
> 	at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:80)
> 	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
> 	at org.elasticsearch.cli.Command.main(Command.java:79)
> 	at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:36)
> 
> And I noticed a warning, too:
> Future versions of Elasticsearch will require Java 11; your Java version from [/usr/local/openjdk8/jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.

You can instruct elasticsearch to use Java 11 at run time (using elasticsearch_java_home rc.conf variable).

> 
> Is it possible to bump the Java-Version on which ES is dependent to something which is supported by both the Prometheus Exporter and ES 7 (and possible future version?)

I will have to consider this anyway.

Thanks for noticing this.
otis


—
Juraj Lutter
otis@FreeBSD.org