Cannot launch elasticsearch, Exception in thread "main" Could not generate secret key

Prior to executing ./elasticsearch, I attempt to create a keystore, but get the below error

/elasticsearch-keystore create
Exception in thread "main" Could not generate secret key
at javax.crypto.SecretKeyFactory.generateSecret(Unknown Source)
at org.elasticsearch.common.settings.KeyStoreWrapper.createCipher(
at org.elasticsearch.common.settings.KeyStoreWrapper.encrypt(
at org.elasticsearch.common.settings.CreateKeyStoreCommand.execute(
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
at org.elasticsearch.cli.MultiCommand.execute(
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
at org.elasticsearch.cli.Command.main(
at org.elasticsearch.common.settings.KeyStoreCli.main(
Caused by: java.lang.RuntimeException: Error deriving PBKDF2 keys
at Source)
at Source)
at Source)
... 11 more

What is the issue?

I am exporting my Java variable to the OpenJDK 10 and operating on the OpenJDK

openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment 18.3 (build 10.0.2+13)
OpenJDK 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

/elasticsearch -version
Version: 6.3.2, Build: default/zip/053779d/2018-07-20T05:20:23.451332Z, JVM: 1.8.0_161

Are you sure you are not using an IBM jdk? Both your stack trace, and some googling indicate this is a problem with that. We currently use an empty passphrase in the keystore. Note that starting in 6.4.0, the keystore implementation has been reworked so it no longer uses PBKDF2, so this would go away. But Elastic still does not officially support running on IBM's java.

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