ThingWorx Analytics Upgrade, Modify, Repair > Upgrading to Java 11 for 9.1.x > Java 11 Upgrade for Analytics Server - Linux
Java 11 Upgrade for Analytics Server - Linux
Before the Upgrade
The Java 11 upgrade procedure can only be started if you have completed the following tasks:
Upgrade your Analytics Server to release 9.1.
Install Java 11. For more information, see the Amazon Corretto.
Update the Service Files
Use the steps below to update the necessary service files.
1. Shut down your Analytics Server so that it is not running.
2. Note the following file paths related to your Java 11 installation:
Java 11 installation directory – Sample file path: /usr/lib/jvm/java-11-amazon-corretto
Java 11 executable – Sample file path: /usr/lib/jvm/java-11-amazon-corretto/bin/java
3. In a text editor, open each of the following service files, located in the /etc/systemd/system/ file path, and update the variables described in the table below:
twas-analytics-worker-1.service
twas-analytics-worker-2.service
twas-analytics-worker-3.service
twas-async-ms.service
twas-sync-ms.service
twas-twx-adapter.service
twas-zookeeper.service
Variable
What to Update
Sample Configuration
JAVA_HOME
Update each service to point to the Java 11 installation directory.
Environment='JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto'
ExecStart
Update each service (except ZooKeeper) so the initial section of the variable points to the Java 11 executable.
ExecStart=/usr/bin/nohup "/usr/lib/jvm/java-11-amazon-corretto/bin/java" ...
4. Open a terminal window as a root user and execute the following command to reload the updated services:
systemctl daemon-reload
Import SSL Certificates
If you have enabled SSL support using self-signed certificates, you must import certain certificate files into the Java 11 cacerts file. In some cases, you might need to extract the certificate files from your old Java cacerts before you can import them to the Java 11 file. Follow the instructions in the table below to import the necessary SSL certificate files.
* 
If you are using certificates from a trusted Certificate Authority, they will already be available in the Java 11 cacerts file.
Files
Instructions
ThingWorx SSL certificate
(a PEM or CER file)
Extract command:
keytool -keystore <path to ../java8/jre/lib/security/cacerts> -alias<assigned certificate alias> -export-file<path and file name of the certificate>.cer
Import command:
keytool -keystore<path to ../java11/lib/security/cacerts>-alias<assigned certificate alias> -import-trustcacerts -file<path and file name of the certificate>.cer
Analytics Server keystore
(a JKS file)
Import command:
keytool -importkeystore-srckeystore<path to the Analytics Server keystore>-destkeystore<path to ../java11/lib/security/cacerts>
ZooKeeper
None. The ZooKeeper certificate does not need to be imported to the Java 11 cacerts file.
Final Upgrade Steps
1. Configure your JAVA_HOME environment variable to point to the path of the Java 11 installation directory.
2. Restart Analytics Server.
Was this helpful?