Under certain circumstances, OpsCenter Lifecycle Manager may fail to install java unless the OpsCenter version being used is at least 6.0.11 in the 6.0.x series, or 6.1.4 in the 6.1.x series. This issue may manifest with the following error message:
Again in text form for searchability:
Event ID: 77f93f21-9330-4e7b-8ab7-13f8f1fac50b Resource: http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/server-jre-8u181-linux-x64.tar.gz Event Type: error- MeldError Changes: No Result/Message: 404 Client Error: Not Found for url: http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/server-jre-8u181-linux-x64.tar.gz?AuthParam=1539811658_c1218317c8ada573336cc3d653d42fe9
LCM has a default URL that it uses to download Oracle Java 8. When Oracle publishes a Java update, the URL changes the previous URL immediately stops working. Furthermore, the new URL cannot be predicted in advance. This means that there is a period during which the LCM default URL is incorrect and Java downloads fail by default.
This can be addressed 3 ways, any one of which is sufficient:
- Updating the Java Version in Config Profiles
- Using a Custom Java URL in Config Profiles
- Updating Definitions
Updating the Java Version in Config Profiles
The LCM documentation for Managing Java Installs shows how to download a specific version of Java by updating the
java-setup page of your configuration profile(s). You can set
build-hash according to the current url published by oracle.
An example URL found at that page might be
http://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/server-jre-8u191-linux-x64.tar.gz In this case, the relevant values are:
1.8.0, this never changes for a java 8 release.
Given correct values for each of the above fields, LCM will automatically construct the Oracle Java download URL.
Using a Custom Java URL in Config Profiles
If you are concerned about future outages caused by Oracle Java updates, you can host Oracle Java yourself on an internally accessible web server. See the LCM offline install kbase for details.
When Oracle releases a Java update, the engineering team that develops OpsCenter and LCM try to release updated defaults for the java-setup page as quickly as possible. This often happens within 24 hours of the Oracle Java update.
OpsCenter instances that have outbound HTTPS access to
opscenter.datastax.com will automatically download these updated definitions and once this happens jobs will be successful even if you take no action.
OpsCenter instances with limited outbound connectivity, or that have had definitions updates disabled, can have definitions manually updates as described in Updating and configuring definitions files properties.
Special Considerations for Older Versions of OpsCenter
Older versions of OpsCenter may encounter a second error message related to upgrading Java:
No such file or directory: 'local_policy.jar'. Upgrade OpsCenter to 6.0.11, 6.1.4, or a more recent version to resolve this issue, or work around it by unchecking the manage-jce box in the java-setup page of the relevant config-profile(s).
In Oracle Java 8u151 and later, Oracle moved the location of the export-strength JCE policy files. Due to this change, OpsCenter/LCM versions 6.0.0-6.0.10 and 6.1.0-6.1.3 are unable to perform JCE installs on Java 8u151 and later.