6

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?

Community
  • 1
  • 1
Mingway
  • 63
  • 1
  • 1
  • 5

2 Answers2

4

This problem happened with me also. Reason in my case was "Keystore" was created using different jdk i.e. oracle jdk, And I was trying to open it with keytool command available in IBM's jdk. Once I tried with oracle jdk it worked.

Raman Sharma
  • 1,940
  • 2
  • 11
  • 10
  • Note also the java vaerion can also be a reason, I was trying to open a cacert with open-jdk 8 which failed and was ok with open-jdk 11 – рüффп Feb 14 '22 at 09:56
3

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.

Dilshan
  • 3,231
  • 4
  • 39
  • 50