Error at java.time.chrono.JapaneseEra

Hi, i'm using elasticsearch 6.5.4 (community edition) on Debian.
Whenever I start it up, it runs for 5/10 seconds and then immediately fails.
My cluster have 2 nodes and basic configuration, one normally runs one goes wrong.
This is the cluster log:

java.lang.ExceptionInInitializerError: null
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_212]
        at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_212]
        at org.elasticsearch.painless.lookup.PainlessLookupBuilder.addPainlessClass(PainlessLookupBuilder.java:176) ~[?:?]
        at org.elasticsearch.painless.lookup.PainlessLookupBuilder.buildFromWhitelists(PainlessLookupBuilder.java:70) ~[?:?]
        at org.elasticsearch.painless.PainlessScriptEngine.<init>(PainlessScriptEngine.java:109) ~[?:?]
        at org.elasticsearch.painless.PainlessPlugin.getScriptEngine(PainlessPlugin.java:89) ~[?:?]
        at org.elasticsearch.script.ScriptModule.<init>(ScriptModule.java:80) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.node.Node.<init>(Node.java:362) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.node.Node.<init>(Node.java:265) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.5.4.jar:6.5.4]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.5.4.jar:6.5.4]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.5.4.jar:6.5.4]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) ~[elasticsearch-6.5.4.jar:6.5.4]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
        at java.time.chrono.JapaneseEra.<clinit>(JapaneseEra.java:179) ~[?:1.8.0_212]
        ... 19 more

Thanks
Silvio

Hi Silvio,

I suspect something environmental. The REIWA Japanese era was added in between JDKs 1.8.0_144 and 1.8.0_212, but your installation seems confused about whether this era exists or not. How did you install Elasticsearch and your JDK? Can you try a clean installation, ideally from official packages rather than anything repackaged by Debian?

I have tried running Elasticsearch 6.5.4 with JDK 1.8.0_212 (specifically Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_212/25.212-b10) and do not get this error.

From your advice i have installed openjdk, the latest version.

openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.16.04.1-b03) OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)

Now the the node go up without errors and without reinstall elastic, that I had already installed with apt-get and Debian package.
Thanks a lot

1 Like

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