Cannot install v6 on Buster

I am trying to install ES-6.8.1 on a fresh Debian (Buster) server. While v7* installed fine, v6 doesn't:

Setting up elasticsearch (6.8.1) ...
Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.base/javax.crypto.SecretKeyFactory.nextSpi(SecretKeyFactory.java:303)
        at java.base/javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121)
        at java.base/javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:168)
        at org.elasticsearch.common.settings.KeyStoreWrapper.createCipher(KeyStoreWrapper.java:289)
        at org.elasticsearch.common.settings.KeyStoreWrapper.encrypt(KeyStoreWrapper.java:368)
        at org.elasticsearch.common.settings.KeyStoreWrapper.save(KeyStoreWrapper.java:477)
        at org.elasticsearch.common.settings.CreateKeyStoreCommand.execute(CreateKeyStoreCommand.java:58)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:77)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.common.settings.KeyStoreCli.main(KeyStoreCli.java:41)
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
        at java.base/javax.crypto.JceSecurity.<clinit>(JceSecurity.java:120)
        ... 13 more
Caused by: java.lang.SecurityException: Couldn't parse jurisdiction policy files in: unlimited
        at java.base/javax.crypto.JceSecurity.setupJurisdictionPolicies(JceSecurity.java:357)
        at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:111)
        at java.base/javax.crypto.JceSecurity$1.run(JceSecurity.java:108)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/javax.crypto.JceSecurity.<clinit>(JceSecurity.java:107)
        ... 13 more
dpkg: error processing package elasticsearch (--configure):
 installed elasticsearch package post-installation script subprocess returned error exit status 1
  • = I am currently not able to use v7 due to some compatibility problems with a PHP script that we're using.

Fixed it, i guess. I've switched from OpenJDK 11 to Oracle JDK 12 and it installed without problems.

I am not able to reproduce this. Can you confirm that you had the package openjdk-11-jdk installed? Can you share the directory listing of /usr/lib/jvm/java-11-openjdk-amd64/conf/security/policy/unlimited and the contents of the files that are in that directory?

OpenJDK was installed for sure. The server has been set-up a few minutes before. However, it works now with the Oracle JDK 12.

Ty anyways.

Sure, I was hoping to troubleshoot the issue with JDK 11 on Buster in case there is a general issue that other users might encounter. If you can provide more information, that would be appreciated, but if not, I understand since we all just want to move on and get our jobs done.

I understand that. However, we've encountered this on a production server, so there's no way for me to reproduce this issue there, without breaking anything. But as soon as the sun allows me to access my computer (it's over 104 °F in my office), i'll try reproducing this in a test environment.

From what i can recall: I've installed ES7 first, noticed that my API is currently not compatible and removed ES7 (apt remove elasticsearch --purge). Then, i've installed openjdk11-jdk and tried installing ES6. I guess, that was the problem.

Thanks. I tried your reproduction steps and the issue still did not reproduce for me.

Me neither. Tried to reproduce this on a fresh mashine, but it worked this time.

Okay, thanks for trying. I’ll keep an eye out for issues like this.

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