Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® Enterprise Service 10

Reply
Contributor
Posts: 10
Registered: ‎08-13-2010
My Device: Not Specified

BES 10.1 Installation Error CBES10CertDataCon::CreateKeystoreFile: Failed to create the keystore

Hi

 

My BES10.1 Installation fails at the last hurdle with the following errors in the logs:

 

<#03>[30000] (05/15 11:12:50.726):{0x31F4} CJavaKeystore:Smiley Very HappyoesKeystoreExist for [C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Service 10\Certs\BES10\m Files (x86)\Research In Motion\BlackBerry Enterprise Service 10\Certs\BES10\keystore] returns [0]
<#03>[30000] (05/15 11:12:50.726):{0x31F4} JavaKeytoolHelper::GenerateSelfSignedCertificateInKeystoreFile - Commandline: ["C:\Program Files (x86)\Java\jre1.7.0_05\bin\java.exe" -Duser.country=US -Duser.language=en sun.security.tools.KeyTool -genkey -v -dname "CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA" -alias "httpssl" -keypass "XXXXXXXX" -keystore "C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Service 10\Certs\BES10\keystore" -storepass "XXXXXXXX" -validity 9125 -keyalg RSA -sigalg SHA512withRSA -noprompt -ext san="dns:BES10_4SIGHTAPPS1.4SIGHT.LOCAL" ]
<#01>[10000] (05/15 11:12:58.861):{0x31F4} JavaKeytoolHelper::GenerateSelfSignedCertificateInKeystoreFile - Error attempting to open keystore file [C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Service 10\Certs\BES10\keystore]
<#01>[10000] (05/15 11:12:58.861):{0x31F4} CBES10CertDataCon::CreateKeystoreFile: Failed to create the keystore [C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Service 10\Certs\BES10\keystore].
<#01>[10000] (05/15 11:12:58.861):{0x31F4} [CBES10CertDataCon::CreateKeystoreFileFailed to create the keystore]:
<#01>[10000] (05/15 11:12:58.861):{0x31F4} CDataContainer:Smiley Very HappyoApplyImpl: BES10CertDataCon failed to apply. Result: 487008.

 

 

If I extract the java commandline and run it separately, I get the following error:

 

"C:\Program Files (x86)\Java\jre1.7.0_05\bin\java.exe" -Duser.country=US -Duser.language=en sun.security.tools.KeyTool -genkey -v -dname "CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA" -alias "httpssl" -keypass "XXXXXXXX" -keystore "C:\Program Files (x86)\Research In Motion\BlackBerry Enterprise Service 10\Certs\BES10\keystore" -storepass "XXXXXXXX" -validity 9125 -keyalg RSA -sigalg SHA512withRSA -noprompt -ext san="dns:BES10_4SIGHTAPPS1.4SIGHT.LOCAL"

 

Generating 2,048 bit RSA key pair and self-signed certificate (SHA512withRSA) with a validity of 9,125 days for: CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA
keytool error: java.lang.RuntimeException: java.io.IOException: DNSName components must consist of letters, digits, and hyphens 
java.lang.RuntimeException: java.io.IOException: DNSName components must consist of letters, digits, and hyphens
at sun.security.tools.KeyTool.createV3Extensions(Unknown Source)
at sun.security.tools.KeyTool.doSelfCert(Unknown Source)
at sun.security.tools.KeyTool.doGenKeyPair(Unknown Source)
at sun.security.tools.KeyTool.doCommands(Unknown Source)
at sun.security.tools.KeyTool.run(Unknown Source)
at sun.security.tools.KeyTool.main(Unknown Source)
Caused by: java.io.IOException: DNSName components must consist of letters, digits, and hyphens
at sun.security.x509.DNSName.<init>(Unknown Source)
at sun.security.tools.KeyTool.createGeneralName(Unknown Source)
... 6 more

 

If I remove the -ext san="dns:BES10_4SIGHTAPPS1.4SIGHT.LOCAL" switch, it works ok?

 

Googling the error finds this error in the source code for Java:

 

"DNSName components must consist of letters, digits, and hyphens"

 

Is this a bug in the installer?

BlackBerry Employee
Posts: 750
Registered: ‎05-15-2008
My Device: Z10
My Carrier: Rogers

Re: BES 10.1 Installation Error CBES10CertDataCon::CreateKeystoreFile: Failed to create the keystore

It looks like Java doesn't like the _ in your DNS name.

Contributor
Posts: 10
Registered: ‎08-13-2010
My Device: Not Specified

Re: BES 10.1 Installation Error CBES10CertDataCon::CreateKeystoreFile: Failed to create the keystore

Hi

 

Sorry, I meant to say that I tried without the _ (underscore) character in the hostname and it returned the same result.

 

Any other suggestions?

 

Kind Regards

Sean

BlackBerry Employee
Posts: 750
Registered: ‎05-15-2008
My Device: Z10
My Carrier: Rogers

Re: BES 10.1 Installation Error CBES10CertDataCon::CreateKeystoreFile: Failed to create the keystore

I got a slightly different error when I removed your _. 

 

"C:\Program Files (x86)\Research In Motion\Universal Device Service\RIM.BUDS.Gui\jre\bin\java.exe" -Duser.country=US -Duser.language=en sun.security.tools.KeyTool -genkey -v -dname "CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA"-alias "test2" -keypass "" -keystore "C:\Program Files (x86)\Research In Motion\Universal Device Service\RIM.BUDS.Gui\ssl\keystore" -storepass "" -validity 9125 -keyalg RSA -sigalg SHA512withRSA -noprompt -ext san="dns:BES104SIGHTAPPS.4SIGHT.LOCAL"

 

Generating 2,048 bit RSA key pair and self-signed certificate (SHA512withRSA) with a validity of 9,125 days
        for: CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA
keytool error: java.lang.RuntimeException: java.io.IOException: DNSName components must begin with a letter

 

When I removed the 4 from 4SIGHT it worked:

 

C:\Users\UDSAdmin>"C:\Program Files (x86)\Research In Motion\Universal Device Service\RIM.BUDS.Gui\jre\bin\java.exe" -Duser.country=US -Duser.language=en sun.security.tools.KeyTool -genkey -v -dname "CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA" -alias "test2" -keypass "" -keystore "C:\Program Files (x86)\Research In Motion\Universal Device Service\RIM.BUDS.Gui\ssl\keystore" -storepass "" -validity 9125 -keyalg RSA -sigalg SHA512withRSA -noprompt -ext san="dns:BES104SIGHTAPPS.SIGHT.LOCAL"

Generating 2,048 bit RSA key pair and self-signed certificate (SHA512withRSA) with a validity of 9,125 days
        for: CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA
New certificate (self-signed):
[
[
  Version: V3
  Subject: CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA
  Signature Algorithm: SHA512withRSA, OID = 1.2.840.113549.1.1.13

  Key:  Sun RSA public key, 2048 bits
  modulus: 243729108589126700035058846418144888684047180791725000175548144782267
00690692036032373662375390515418181698506123139962572348686031167322393024841210
66713370319714806939535932680407229193221694266754145605847476792426465140495551
25823207879071371051771282841345642271832997139221689664984130436740545822411661
29861699701591062291853763994478672204583217621447474500115552563268467177223128
58178932398648399698315377722064377777592552990451428475725225923275474172217176
22283450137381641346309173518831503413345685086768988692792506917980771148490914
23967869894734182288827870241617446337572479687651126119895805603863
  public exponent: 65537
  Validity: [From: Wed May 15 12:45:04 ADT 2013,
               To: Sun May 09 12:45:04 ADT 2038]
  Issuer: CN=*.4SIGHT.LOCAL, OU=BES, O=RIM, C=CA
  SerialNumber: [    57aa6f3c]

Highlighted
Contributor
Posts: 10
Registered: ‎08-13-2010
My Device: Not Specified

Re: BES 10.1 Installation Error CBES10CertDataCon::CreateKeystoreFile: Failed to create the keystore

Hi

 

OK, so after using a hostname rather than fqdn the install works.  I blame the person who decided to create a company which contravenes RFC rules.....  :-)