"keytool error: java.io.IOException: Invalid keystore format"

Mingway picture Mingway · May 30, 2014 · Viewed 27.5k times · Source

I got a problem when I try to deploy the WSO2 EMM server. In the doc https://docs.wso2.org/display/EMM101/iOS+Server+Configurations, step 7.b, when I try to execute this command:

keytool -importkeystore -srckeystore ca.p12 -srcstoretype PKCS12 -destkeystore wso2mobilemdm.jks

I got this error message:

"keytool error: java.io.IOException: Invalid keystore format"

looks like the wso2mobilemdm.jks is corrupt? I copy the wso2mobilemdm.jks from the binary package

"wso2mobileserver-1.0.1\repository\resources\security\wso2mobilemdm.jks"

Anything wrong?

Answer

Dilshan picture Dilshan · Jun 11, 2014

That is because you are entering a wrong password. Just delete that file and execute this command again. It will create a new wso2mobilemdm.jks. Enter your passwords there. Also import the ra.p12 to the same keystore file you just created. There is no harm doing this since wso2mobilemdm.jks only will contain ca and ra entries.