Error: F_JG202F: Cannot Open Shared Object File
Issue
After upgrading to HVR 6.2, the following errors appear while testing a connection to a db2 database:
F_JG202F: Attempt to load dynamic shared library '/opt/hvr/hvr_home/lib/hvr_dz105.so' failed with error: 'libdb2.so.1: cannot open shared object file: No such file or directory'. This problem could be because this library or a library it referenced was not contained in library search path variable 'LD_LIBRARY_PATH'.F_JR058E The previous error occurred while testing location 'db2q'.F_JG0557 The previous error occurred during request [POST /latest/hubs/training/locs/db2q/test].
Environment
- HVR 6.2
- Source: Db2
Resolution
- Download the 64-bit IBM Data Server Driver for ODBC and CLI that matches your Db2 server version. Db2 11.5 drivers are compatible with Db2 10.x and 11.x servers.
- Extract the driver to a directory such as
/opt/ibm/db2/clidriver. - Expose the library path for the HVR processes:
bash export DB2_CLI_DRIVER_INSTALL_PATH=/opt/ibm/db2/clidriver export LD_LIBRARY_PATH=$DB2_CLI_DRIVER_INSTALL_PATH/lib:$LD_LIBRARY_PATH- If the agent runs using hvrremotelistener, add these export statements to the listener start script or the corresponding hvrtab entry so they persist after service restarts.
- Verify that the library dependency resolves correctly:
bash ldd /opt/hvr/hvr_home/lib/hvr_dz105.so | grep libdb2- The output should display a valid path to
libdb2.so.1.
- The output should display a valid path to
- Restart the HVR agent or capture job to ensure the new environment is registered.
- Run hvrtestlocation or click Test Location in HVR.
Tips
- Ensure both the HVR and Db2 CLI drivers are 64-bit. All modern Linux builds of HVR are 64-bit.
- If multiple Db2 versions are installed, verify that
libdb2.so.1points to the intended version. - Use
lddto identify unresolved shared library dependencies.
Cause
In HVR 6.1, the Db2 connector was statically linked and did not require libdb2.so.1 at runtime.
Starting with HVR 6.1.5 and continuing in all 6.2 releases, we use dynamic linking for the Db2 connector. This reduces binary size and allows independent patching of the Db2 client for security updates, but it requires the Db2 CLI driver to be installed and accessible through LD_LIBRARY_PATH.