Receiving the error "Invalid keystore format" when performing 'keytool -list'

Solution Verified - Updated -

Issue

After creating a keystore, I want to check it with keytool -list -v -keystore <FILE>.keystore, I got error as follow:

$ keytool -list -v -keystore <FILE>.keystore
keytool error: java.io.IOException: Invalid keystore format
java.io.IOException: Invalid keystore format
        at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:666)
        at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:57)
        at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
        at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:71)
        at java.security.KeyStore.load(KeyStore.java:1445)
        at sun.security.tools.keytool.Main.doCommands(Main.java:839)
        at sun.security.tools.keytool.Main.run(Main.java:380)
        at sun.security.tools.keytool.Main.main(Main.java:373)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.X
  • Red Hat Single Sign-On (RH SSO)
    • 7.X

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content