IBM Support

Changing from OpenJDK (HotSpot) to IBM SDK (or viceversa) results in: Failed to start IBM UrbanCode Deploy

Troubleshooting


Problem

Attempts to replace the OpenJDK (HotSpot) (or Oracle® JDK) with the IBM® SDK, Java ™ Technology Edition when configuring IBM UrbanCode Deploy result in the error "java.lang.RuntimeException: Failed to start IBM UrbanCode Deploy" followed by "Caused by: java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector".
A similar error is obtained attempting to replace the IBM SDK with the OpenJDK (HotSpot) or OracleJDK. The same applies to replacing the Java Runtime Environment (JRE) of the corresponding vendors.

Symptom

Starting the UrbanCode Deploy server after replacing the OpenJDK (or the Oracle JDK) with the IBM SDK, Java Technology Edition results in the following error:


2014-12-05 13:39:25,689 ERROR main com.urbancode.container.tomcat.Container - Failed to start IBM UrbanCode Deploy java.lang.RuntimeException: Failed to start IBM UrbanCode Deploy
at com.urbancode.ds.UDeployServer.start(UDeployServer.java:440)
at com.urbancode.container.tomcat.Container.run(Container.java:98)
at com.urbancode.ds.UDeployServer.main(UDeployServer.java:289)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.urbancode.launcher.Launcher.invokeMainMethod(Launcher.java:235)
at com.urbancode.launcher.Launcher.launch(Launcher.java:161)
at com.urbancode.launcher.Launcher.main(Launcher.java:89)
Caused by: java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector
at com.ibm.crypto.provider.JceKeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(KeyStore.java:1226)
at com.urbancode.ds.UDeployServer.loadKeyStore(UDeployServer.java:1930)
at com.urbancode.ds.UDeployServer.retrieveSecretKey(UDeployServer.java:1883)
at com.urbancode.ds.UDeployServer.initializeEncryptionKey(UDeployServer.java:1864)
at com.urbancode.ds.UDeployServer.start(UDeployServer.java:426)



The same error will appear if you do the following:
  1. Use the OpenJDK (or the Oracle JDK) to launch the installation script of UrbanCode Deploy
     
  2. Provide the path to the IBM JDK, while running the installation script.


The reason is that the file encryption.keystore is created during the installation of IBM UrbanCode Deploy. Therefore encryption.keystore is compatible with the JVM that launches the installer script, not with the JVM that you use for running the server.

Starting with UrbanCode Deploy 6.2.1.1, the Agent also includes a file called encryption.keystore. So from this Agent version, you may also observe the following error in the Agent log, and the Agent will not appear in the list on the Server user interface:


2017-03-22 16:28:59,950 ERROR AgentWorkerThread com.urbancode.air.agent.AgentWorker - java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector
java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector
at com.ibm.crypto.provider.JceKeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(KeyStore.java:1456)
at com.urbancode.air.agent.AgentWorker.loadKeyStore(AgentWorker.java:690)
at com.urbancode.air.agent.AgentWorker.assertSecretKeyExists(AgentWorker.java:645)
at com.urbancode.air.agent.AgentWorker.initializeEncryptionKey(AgentWorker.java:632)
at com.urbancode.air.agent.AgentWorker.startAgent(AgentWorker.java:302)
at com.urbancode.air.agent.AgentWorker.execute(AgentWorker.java:228)
at com.urbancode.air.agent.AgentWorker.access$100(AgentWorker.java:102)
at com.urbancode.air.agent.AgentWorker$1.run(AgentWorker.java:169)

This change is documented here: Starting with version 6.2.1.1 of the product, you can enable end-to-end encryption of traffic that uses the JMS protocol.

Cause

The file encryption.keystore contains a secret key used to encrypt secured properties stored in the UrbanCode Deploy Database (in the case of the Server), or the API Key (in the case of the Agent). The IBM SDK cannot open the file encryption.keystore created by the OpenJDK (or the Oracle JDK) because the underlying formats are different.

As a consequence:
- any UrbanCode Deploy server installed with the OpenJDK (or the Oracle JDK) cannot start with the IBM SDK because the server cannot read the secured properties from the database.
- any UrbanCode Deploy agent installed with the OpenJDK (or the Oracle JDK) cannot start with the IBM SDK because the agent cannot read the encryption key and decipher the API Key. (Note: You can view the API key of an agent by clicking Settings > Security > API Keys on the server).

Diagnosing The Problem

Server:

Check the server log, located in: <server_installation>\var\log\deployserver.out to diagnose the problem.

Agent:

Check the agent log, located in: <agent_installation>\var\log\agent.out to diagnose the problem.

Resolving The Problem

Contact the IBM UrbanCode Deploy Support team to obtain an utility that will allow you to convert the encryption.keystore created by the OpenJDK (or Oracle JDK) into a keystore that the IBM SDK can read.
Note: You can also use the converter utility to convert the encryption.keystore created by the IBM SDK into a keystore that the OpenJDK (HotSpot) (or Oracle JDK) can read.

Internal Use Only

The source code is located here:
https://github01.hclpnp.com/urbancode/common-keystore-converter/commits/master/src/main/java/com/urbancode/keystore/converter

This technote was generated by Technote Kickstart 1.1.0.85 based on Rational Customer Support PMR 29592,019,866.
View the associated PMR's text via Wellspring at: http://eclient.lenexa.ibm.com:9082/DocFetcher/source/PMR/29592.019.866%20O14/12/05

[{"Product":{"code":"SS4GSP","label":"IBM UrbanCode Deploy"},"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Component":"Installation","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF022","label":"OS X"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"6.0;6.0.1;6.0.1.1;6.0.1.10;6.0.1.11;6.0.1.12;6.0.1.2;6.0.1.3;6.0.1.4;6.0.1.5;6.0.1.6;6.0.1.7;6.0.1.8;6.0.1.9;6.1;6.1.0.1;6.1.0.2;6.1.0.3;6.1.0.4;6.1.1;6.1.1.1;6.1.1.2;6.1.1.3;6.1.1.4;6.1.1.5;6.1.1.6;6.1.1.7;6.1.1.8;6.1.2;6.1.3;6.1.3.1;6.1.3.2;6.2;6.2.0.1;6.2.0.2;6.2.1;6.2.1.1;6.0.1.13;6.1.3.3;6.2.1.2;6.0.1.14;6.2.2;6.2.2.1;6.2.3.0;6.2.3.1;6.1.3.5;6.1.3.4;6.2.4","Edition":""}]

Document Information

Modified date:
24 May 2019

UID

swg21692970