Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL initContainer failed with "keytool error: java.io.IOException: keystore password was incorrect" #6

Open
AkarshES opened this issue May 24, 2019 · 6 comments

Comments

@AkarshES
Copy link

I followed the instructions given for enabling SSL. The init container setup-keystore-and-properties errors out with the following output. I have used the default password of 'changeit' for the password.

unable to write 'random state'
Importing keystore /tmp/keystore.pkcs12 to /tmp/keystore/solr.jks...
keytool error: java.io.IOException: keystore password was incorrect

@snooyen
Copy link

snooyen commented May 11, 2020

@AkarshES Were you able to resolve this?

@AkarshES
Copy link
Author

Nope, I could not figure it. Its close to a year now, I am not sure what I ended up trying to debug.

@snooyen
Copy link

snooyen commented May 12, 2020

Really strange. I can't get it to work on EKS, but I'm seeing it work on AKS.

@snooyen
Copy link

snooyen commented May 12, 2020

Figured it out.
You need to set a Subject on the certificate that you create

@snooyen
Copy link

snooyen commented May 12, 2020

Here's the verbose error:

keytool error: java.io.IOException: keystore password was incorrect
java.io.IOException: keystore password was incorrect
	at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(Unknown Source)
	at java.base/sun.security.util.KeyStoreDelegator.engineLoad(Unknown Source)
	at java.base/java.security.KeyStore.load(Unknown Source)
	at java.base/sun.security.tools.keytool.Main.doCommands(Unknown Source)
	at java.base/sun.security.tools.keytool.Main.run(Unknown Source)
	at java.base/sun.security.tools.keytool.Main.main(Unknown Source)
Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: java.security.cert.CertificateParsingException: X.509 Certificate is incomplete: subject field is empty, and SubjectAlternativeName extension is absent

@DumboJet
Copy link

DumboJet commented Mar 9, 2022

Same issue here.
And I do have a CN on my certificate, matching the one on my SOLR_HOST environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants