Upgrading Java on Linux - 8.0

Version
8.0
Language
English (United States)
EnrichDitaval
Data Fabric for Linux
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Installation and Upgrade

Upgrading Java for all Talend services on Linux

You can upgrade Java to avoid security issues. This procedure will go through the differents steps required for minor or major updates of Java on Talend services. It can also be followed for minor downgrades.

Before you begin

  • Retrieve the update_java.sh file from the tab of the menu located in the panel of this page.

About this task

This procedure applies to all Talend services, except Talend Remote Engine. See section Upgrading Java for Talend Remote Engine for more details.
Note: Nexus do not support Java 11.

Procedure

  1. Install the new Java version according to the Compatible Java environments page.
  2. Find all the running Talend services with the command systemctl | grep talend.
  3. Stop all Talend services with the command systemctl stop <service name>.
  4. Open update_java.sh with a text editor.
  5. Locate the variables in the script and set them as follows:

    TALEND_HOME=<Talend_home_folder> (for example: TALEND_HOME=/opt/Talend-8.0.1)

    PROD_VER=<Talend_version> (for example: PROD_VER=8.0.1)

    JAVA_HOME=<Java_home_folder> (for example: JAVA_HOME=/usr/lib/jvm/jre1.8.0_221)
  6. As a superuser, run update_java.sh. This script will replace the hard-coded path to Java with the new values in your installation.
  7. Restart your computer or start all Talend services manually with the command systemctl start <service name>.

Results

All Talend services are now using the new Java version.

Upgrading Java for Talend Remote Engine

This section describes the upgrade of Java version from 8 to 11, when a Remote Engine is already installed.

About this task

Procedure

  1. Having the Remote Engine running on Java 8, copy/paste the following files into <RE>/deploy directory:
    • <RE>/system/org/apache/servicemix/specs/org.apache.servicemix.specs.jaxws-api-2.3/2.3_2/org.apache.servicemix.specs.jaxws-api-2.3-2.3_2.jar.
    • <RE>/system/org/apache/servicemix/specs/org.apache.servicemix.specs.saaj-api-1.4/1.4_1/org.apache.servicemix.specs.saaj-api-1.4-1.4_1.jar (only in case the observability feature is not enabled).
    Wait for a minute until the installation is complete.
  2. Stop your Remote Engine and its service if they are running (see Managing the Remote Engine Service).
  3. Install the Java 11 version.
  4. Update the system service file (/opt/Talend Remote Engine/etc/talend-remote-engine-wrapper.conf):
    1. Edit the file and look for the following line: set.default.JAVA_HOME=/usr/lib/jvm/jre1.8.0_221.
      Update it with the new JAVA_HOME path. For example: set.default.JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64".
    2. Add a new variable to describe the Remote Engine Karaf container version (value should be: 4.2.12 for RE versions 2.11.2 - 2.11.11 and 4.2.15 for RE versions starting from 2.12.0).
      For example: set.default.KARAF_VERSION=4.2.15.
    3. Add extra Java options configuration after "set.JAVA_TOOL_OPTIONS=-Dlog4j2.formatMsgNoLookups=true":
      set.JDK_JAVA_OPTIONS=--add-reads=java.xml=java.logging --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED --patch-
      
      module java.base=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.locator-%KARAF_VERSION%.jar --patch-module 
      java.xml=%KARAF_HOME%/lib/endorsed/org.apache.karaf.specs.java.xml-%KARAF_VERSION%.jar --add-
      opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens 
      java.naming/javax.naming.spi=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-
      exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED --add-
      
      exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED
    4. Update Karaf Java classpath by replacing
      wrapper.java.classpath.1=%KARAF_BASE%/lib/boot/*.jar
      wrapper.java.classpath.2=%KARAF_BASE%/lib/wrapper/*.jar
      by:
      wrapper.java.classpath.1=%KARAF_BASE%/lib/boot/*.jar
      wrapper.java.classpath.2=%KARAF_BASE%/lib/jdk9plus/*.jar
      wrapper.java.classpath.3=%KARAF_BASE%/lib/wrapper/*.ja
    5. Update JVM parameters by replacing
      wrapper.java.additional.1=-Djava.endorsed.dirs=%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:%KARAF_HOME%/lib/endorsed
      wrapper.java.additional.2=-Djava.ext.dirs=%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:%KARAF_HOME%/lib/ext
      wrapper.java.additional.3=-Dkaraf.instances=%KARAF_HOME%/instances
      wrapper.java.additional.4=-Dkaraf.home=%KARAF_HOME%
      wrapper.java.additional.5=-Dkaraf.base=%KARAF_BASE%
      wrapper.java.additional.6=-Dkaraf.data=%KARAF_DATA%
      wrapper.java.additional.7=-Dkaraf.etc=%KARAF_ETC%
      wrapper.java.additional.8=-Dkaraf.log=%KARAF_LOG%
      wrapper.java.additional.9=-Dkaraf.restart.jvm.supported=true
      wrapper.java.additional.10=-Djava.io.tmpdir=%KARAF_DATA%/tmp
      wrapper.java.additional.11=-Djava.util.logging.config.file=%KARAF_ETC%/java.util.logging.properties
      wrapper.java.additional.12=-Dkaraf.startLocalConsole=false
      wrapper.java.additional.13=-Dkaraf.startRemoteShell=true
      by:
      wrapper.java.additional.1=-Dkaraf.instances=%KARAF_HOME%/instances
      wrapper.java.additional.2=-Dkaraf.home=%KARAF_HOME%
      wrapper.java.additional.3=-Dkaraf.base=%KARAF_BASE%
      wrapper.java.additional.4=-Dkaraf.data=%KARAF_DATA%
      wrapper.java.additional.5=-Dkaraf.etc=%KARAF_ETC%
      wrapper.java.additional.6=-Dkaraf.log=%KARAF_LOG%
      wrapper.java.additional.7=-Dkaraf.restart.jvm.supported=true
      wrapper.java.additional.8=-Djava.io.tmpdir=%KARAF_DATA%/tmp
      wrapper.java.additional.9=-Djava.util.logging.config.file=%KARAF_ETC%/java.util.logging.properties
      wrapper.java.additional.10=-Dkaraf.startLocalConsole=false
      wrapper.java.additional.11=-Dkaraf.startRemoteShell=true
      Note: Lines to be replaced are original ones created after the Remote Engine installation. In case you added extra JVM parameters, they should be placed after this above list, with a numbering starting from 12, and without leaving gaps.
  5. Edit file /opt/Talend Remote Engine/bin/talend-remote-engine-service and look for the following line: JAVA_HOME="/usr/lib/jvm/jre1.8.0_221":
    Update it with the new JAVA_HOME path. For example: JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64".
  6. Start the Remote Engine service (see Managing the Remote Engine Service).
  7. Open Talend Cloud Management Console and check your Remote Engine availability and status in logs.
  8. Start your Remote Engine.