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
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.
-
Keycloak
There is a persistent Keycloak 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>/keycloak/bin/standalone.conf
-
Navigate to the very bottom of this file, and you will find the persisted
JAVA_HOME
path property.# Uncomment and edit to use a custom java.security file to override all the Java security properties #JAVA_OPTS="$JAVA_OPTS -Djava.security.properties==/path/to/custom/java.security" # Uncomment to add a Java agent. If an agent is added to the module options, then jboss-modules.jar is added as an agent # on the JVM. This allows things like the log manager or security manager to be configured before the agent is invoked. # MODULE_OPTS="-javaagent:agent.jar" JAVA_HOME=C:\Program Files\Java\jdk-11.0.13
-
Update the path for this property to your new, appropriate Java installation path.
-
Restart the Keycloak service for the change to take effect. The service should now start up without any errors.
R37.0 and Newer: 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.