GitHubContribute in GitHub: Edit online

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:

  1. Update the $JAVA_HOME and/or $JRE_HOME environment variables for the host user that owns the Manta Data Lineage filesystem.

  2. Open the user’s bashrc file: $ vi ~/.bashrc.

  3. 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>"
    
  4. Start the Flow Server and Admin UI services back up. Both services should now start without any issues.

For Windows Hosts:

  1. 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.

    1. Open System Properties, then navigate to the Advanced tab.

    2. 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 add JAVA_HOME and/or JRE_HOME with the correct Java install path.

      No alt text provided

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.

  1. Open the following file for editing.

    1. <manta_install_dir>/keycloak/bin/standalone.conf
  2. 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
    
  3. Update the path for this property to your new, appropriate Java installation path.

  4. 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.

  1. Open the following file for editing.

    1. <manta_install_dir>/artemis/manta_broker/artemis[.cmd]
  2. 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
    
  3. Update the path for this property to your new, appropriate Java installation path.

  4. Restart the Artemis service for the change to take effect. The service should now start up without any errors.