Updating Persistent JAVA_HOME Paths after Upgrading Java
Problem
After upgrading Java on the IBM Manta Data Lineage host machine, the Flow Server, Admin UI, and/or Keycloak services fail to start.
Solution (as of R42)
As of R42 we use a unified configuration file for multiple service configurations. One of these configurations is the path to your java home:
-
Navigate to the configuration file:
<manta_directory>/conf/manta.properties
-
Edit the
manta.java.home
variable with the path to your java home
# global settings
# When changing Java, please consult documentation to verify which versions are supported
# JDK 17 is the minimum required version
manta.java.home=C:/PROGRA~1/Java/jdk-17
Solution (pre R42)
Flow Server and Admin UI (serviceutility)
For Linux/UNIX hosts:
-
Update the
$JAVA_HOME
and/or$JRE_HOME
environment variables for the host user that owns the Manta Data Lineage filesystem. -
Open the user’s bashrc file:
$ vi ~/.bashrc
. -
Add/update the following line(s), then save and quit out of the file.
export JAVA_HOME="<path/to/your/java/install>" export JRE_HOME="<path/to/your/java/install>"
-
Start the Flow Server and Admin UI services back up. Both services should now start without any issues.
For Windows Hosts:
-
The Java installation should update the environment variable(s) automatically during the Java upgrade. If it does not, or they need to be updated for any reason, do the following:
-
Open System Properties, then navigate to the Advanced tab.
-
Click on Environment Variables. Then under User variables for xxxx, either find and edit the
JAVA_HOME
variable, or if it does not exist, click New then addJAVA_HOME
and/orJRE_HOME
with the correct Java install path.
-
Artemis
There is a persistent Artemis property for the JAVA_HOME
variable, which must be updated anytime Java is upgraded or the location is changed.
-
Open the following file for editing.
<manta_install_dir>/artemis/manta_broker/artemis[.cmd]
-
Navigate to the very top of this file, and you will find the persisted
JAVA_HOME
path property.@echo off set "JAVA_HOME=C:\Program Files\Java\jdk-11.0.13" rem Licensed to the Apache Software Foundation (ASF) under one rem or more contributor license agreements. See the NOTICE file rem distributed with this work for additional information rem regarding copyright ownership. The ASF licenses this file
-
Update the path for this property to your new, appropriate Java installation path.
-
Restart the Artemis service for the change to take effect. The service should now start up without any errors.