Important Update: Cohesity Products Knowledge Base Articles
All Cohesity Knowledge Base Articles are now managed via the Cohesity Support Portal: https://support.cohesity.com/s/searchunify. The Knowledge Base articles available here will not reflect the latest information or may no longer be accessible.
Problem
Attempting to update the Java JRE components used by NetBackup with the nbcomponentupdate command fails.
Error Message
Error : JRE version parser failed to get value
An output of the nbcomponentupdate log (created by setting the -logpath option in the command) shows something similar to the following:
#####################################################################################################################################################
Log started
#####################################################################################################################################################
19-10-2018 13:49:59 <DEBUG> [main::initialiseEnv , line=529 ] Commandline: /usr/openv/netbackup/bin/goodies/nbcomponentupdate -product Netbackup -component jre -path /usr/lib/java/java-1.8.8-openjdk-1.8.8.181-3.b13.e17_5.x86_64/jre -logpath /tmp -dryrun
19-10-2018 13:49:59 <DEBUG> [main::initialiseEnv , line=534 ] OS name is linux
19-10-2018 13:49:59 <DEBUG> [main::verifyArguments , line=693 ] Done with parsing
19-10-2018 13:49:59 <DEBUG> [Product::NetBackup::Unix::NetBackup::getInstallPath , line=123 ] Installed dir /usr/openv
19-10-2018 13:49:59 <DEBUG> [Product::NetBackup::Unix::NetBackup::getNetBackupInstallPath, line=138 ] NetBackup Installed dir /usr/openv/netbackup
19-10-2018 13:49:59 <DEBUG> [Product::NetBackup::Unix::NetBackup::__setProductVersion, line=378 ] Product version:8.1.1
19-10-2018 13:49:59 <DEBUG> [main::checkProductVersionValidity , line=921 ] Major Version found is 8.1
19-10-2018 13:49:59 <DEBUG> [Product::NetBackup::Unix::NetBackup::getJREHOMEPath , line=154 ] JRE Installed dir /usr/openv/java/jre
19-10-2018 13:49:59 <DEBUG> [Common::Utils::executeCommand , line=898 ] Executing command: /usr/openv/java/jre/bin/java -version
19-10-2018 13:49:59 <DEBUG> [Component::JREInfo::getVersion , line=264 ] JRE version 1.8.8_151
19-10-2018 13:49:59 <DEBUG> [Common::Utils::executeCommand , line=898 ] Executing command: /usr/openv/java/jre/bin/java -version
19-10-2018 13:49:59 <DEBUG> [Component::JREInfo::is64bit , line=191 ] JRE found is 64bit
19-10-2018 13:49:59 <INFO> [main::printProgress , line=964 ] Java Runtime Environment(JRE) version installed with product 'Veritas NetBackup' : 1.8.8_151 (64bit)
19-10-2018 13:49:59 <DEBUG> [Common::Utils::executeCommand , line=898 ] Executing command: /usr/lib/java/java-1.8.8-openjdk-1.8.8.181-3.b13.e17_5.x86_64/jre/bin/java -version
19-10-2018 13:49:59 <WARNING> [Component::JREInfo::getVersion , line=272 ] Returning empty string as jre version
19-10-2018 13:49:59 <ERROR> [main::dieProgress , line=946 ] Error : JRE version parser failed to get value.
Cause
Note that the path to the JRE is actually pointing to an OpenJDK instance. NetBackup only supports Oracle's JRE at this time. When other versions are used, the nbcomponentupdate command may have issues parsing for information such as the version.
In this example, we see the error with parsing for the version information. OpenJDK's version string had been the same format as Oracle's JDK until version 1.7, but starting with OpenJDK 1.8, the message has been changed as shown below:
$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
However, nbcomponentupdate assumes the 1st line of ‘java -version’ starts with ‘java version’.
This particular case was discovered on RHEL 7, but may affect any operating system if Oracle JRE is not used.
Solution
Obtain and install the latest version of Oracle JRE available for the operating system.