Administer > Configure NNMi to Use a Different Java Development Kit

Configure NNMi to Use a Different Java Development Kit

The NNMi installer, by default, installs OpenJDK 1.8. After installation, you can configure NNMi to use a different, non-default instance of Java Development Kit (JDK) 1.8 that is already installed on the NNMi management server.

Change JDK on a standalone NNMi management server

  1. Log on to NNMi as root or administrator.
  2. Run the following command:

    • On Windows: %nnminstalldir%\bin\nnmupdateJdk.ovpl <path>
    • On Linux: /opt/OV/bin/nnmupdateJdk.ovpl <path>

    In this instance, <path> is the path to the home directory of the non-default JDK.

    The command also updates the NMS_JAVA_HOME environment variable with the reference of the new JDK home directory.

Change JDK on NNMi in an application failover cluster

  1. Note the com.hp.ov.nms.cluster.name property value in the nms-cluster.properties file. You will need this value later. This file is in the following location:

    Windows: %nnmDataDir%\shared\nnm\conf\props\nms-cluster.properties

    Linux: $nnmDataDir/shared/nnm/conf/props/nms-cluster.properties

  2. Run nnmcluster on one of the nodes.
  3. Enter dbsync on the NNMi management server used in the previous step to synchronize the two databases.

    Note The dbsync option works on an NNMi management server using the embedded database. Do not use the dbsync option on an NNMi management server configured to use an Oracle database.

  4. Wait until the active NNMi management server reverts to ACTIVE_NNM_RUNNING and the standby NNMi management server reverts to STANDBY_READY. before continuing.
  5. Exit or quit from the nnmcluster command.
  6. Stop the cluster on the standby NNMi management server by running the following command on the standby NNMi management server:
    nnmcluster -shutdown
  7. Make sure the following processes and services terminate before continuing:

    • postgres
    • ovjboss
  8. Make sure the nnmcluster process terminates before continuing. If the nnmcluster process will not terminate, manually kill the nnmcluster process only as a last resort.

  9. Edit the following file on the standby NNMi management server:

    Windows: %nnmDataDir%\shared\nnm\conf\props\nms-cluster.properties

    Linux: $nnmDataDir/shared/nnm/conf/props/nms-cluster.properties

    1. Comment out the cluster name by placing a # at the front of the line, then save your changes:

      #com.hp.ov.nms.cluster.name = NNMicluster

  10. Run the following command:

    • On Windows:%nnminstalldir%\bin\nnmupdateJdk.ovpl<path>
    • On Linux:/opt/OV/bin/nnmupdateJdk.ovpl<path>

    In this instance, <path> is the path to the home directory of the non-default JDK.

    The command also updates the NMS_JAVA_HOME environment variable with the reference of the new JDK home directory.

  11. Stop the active NNMi management server and immediately bring the standby NNMi management server online to monitor your network.
  12. Shut down the cluster on the active NNMi management server by running the following command on the active NNMi management server:
    nnmcluster -halt
  13. Make sure the nnmcluster process terminates. If it does not terminate within a few minutes, manually kill the nnmcluster process.
  14. On the standby NNMi management server, uncomment the cluster name from the nms-cluster.properties file.

    Note During patch installation the com.hp.ov.nms.cluster.name property value is replaced with the NNMi default value. After you uncomment the line that contains the com.hp.ov.nms.cluster.name parameter, you also need to replace the com.hp.ov.nms.cluster.name property value with the value that was configured before the patch was installed.

    1. Edit the following file:

      • Windows: %NNM_SHARED_CONF%\props\nms-cluster.properties
      • Linux: $NNM_SHARED_CONF/props/nms-cluster.properties
    2. Uncomment the com.hp.ov.nms.cluster.name parameter in the nms-cluster.properties file on the active NNMi management server.

    3. Replace the default value of the com.hp.ov.nms.cluster.name property with the name that was configured in nms-cluster.properties before the command was run.

    4. Save your changes.

  15. Start the cluster on the standby NNMi management server by running the following command on the standby NNMi management server:
    nnmcluster -daemon
  16. Run the command on the active NNMi management server.

    • On Windows:%nnminstalldir%\bin\nnmupdateJdk.ovpl<path>
    • On Linux:/opt/OV/bin/nnmupdateJdk.ovpl<path>
  17. At this point, the previous active NNMi management server is offline. Bring it back into the cluster (as the standby NNMi management server) by performing the following:

    1. Uncomment the com.hp.ov.nms.cluster.name parameter in the nms-cluster.properties file on the active NNMi management server.
    2. Replace the default value of the com.hp.ov.nms.cluster.name property with the name that was configured in nms-cluster.properties before the patch was installed.

    3. Start the active NNMi management server using the following command:
      nnmcluster -daemon
  18. To monitor the progress, run the following command on both the active and standby NNMi management servers:

    nnmcluster

    Wait until the previous active NNMi management server finishes retrieving the database from the previous standby NNMi management server.

  19. After the previous active NNMi management server displays STANDBY_READY, run the following command on the previous active NNMi management server:
    nnmcluster -acquire

Change JDK on NNMi in an HA cluster

To change JDK for NNMi, work in High Availability (HA) maintenance mode. Follow these steps:

  1. Determine which node in the HA cluster is active:

    • Windows:

      %NnmInstallDir%\misc\nnm\ha\nnmhaclusterinfo.ovpl -group <resource_group> -activeNode
    • Linux:

      $NnmInstallDir/misc/nnm/ha/nnmhaclusterinfo.ovpl -group <resource_group> -activeNode
  2. On each passive node, put the NNMi HA resource group into maintenance mode as described in Putting an HA Resource Group into Maintenance Mode.

    Include the NORESTART keyword.

  3. On each passive node, change the JDK by following the steps in Change JDK on a standalone NNMi management server.

    Caution Never run the ovstart or ovstop commands on a secondary (backup) cluster node.

  4. On all passive nodes, take the NNMi HA resource group out of maintenance mode as described in Removing an HA Resource Group from Maintenance Mode.

  5. Fail over to a passive node.

  6. Go to the node that was previously active (in step 1), and then follow these steps:

    1. Put the NNMi HA resource group of the node into maintenance mode as described in Putting an HA Resource Group into Maintenance Mode.

      Include the NORESTART keyword.

    2. On the node, change the JDK by following the steps in Change JDK on a standalone NNMi management server.

      Caution Never run the ovstart or ovstop commands on a secondary (backup) cluster node.

    3. On the node, take the NNMi HA resource group out of maintenance mode as described in Removing an HA Resource Group from Maintenance Mode.