OUI-67076: opatch lsinventory Error
Faced an issue with command ‘opatch lsinventory’ and reports below error in log file.

Cause: OUI-67076:OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.

Please check below ‘opatch lsinventory’ output.

$ $ORACLE_HOME/OPatch/opatch lsinventory
……………………………
……………………………
OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
Lsinventory Output file location : /wwi/app/oracle/product/12.2.0/cfgtoollogs/opatch/lsinv/lsinventory2018-12-28_02-41-49AM.txt
…………………………
…………………………
OPatch Session completed with warnings.
OPatch completed with warnings.
$

$ more  /wwi/app/oracle/product/12.2.0/cfgtoollogs/opatch/opatch2018-12-28_02-41-49AM_1.log
[ 2:41:49 AM]    OPatch invoked as follows: ‘lsinventory -invPtrLoc /u01/oracle/product/11.2.0/oraInst.loc ‘
[ 2:41:49 AM]   ……………………………….
[2:41:49 AM]    Patch history file: /u01/oracle/product/11.2.0/cfgtoollogs/opatch/opatch_history.txt
[2:41:49 AM]    Starting LsInventorySession at Wed Dec 28 02:41:49 PST 2018
[2:41:49 AM]    OUI-67076:OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
[ 2:41:50 AM]    Lsinventory Output file location : /u01/oracle/product/11.2.0/cfgtoollogs/opatch/lsinv/lsinventory2018-12-28_02-41-49AM.txt
……………………………
……………………………
$

Solution:

1) Take a backup of $ORACLE_HOME/.patch_storage directory
$ cp -R $ORACLE_HOME/.patch_storage $ORACLE_HOME/.patch_storage_backup

2) Remove $ORACLE_HOME/.patch_storage/patch_locked
$ rm $ORACLE_HOME/.patch_storage/patch_locked

3) Create empty file $ORACLE_HOME/.patch_storage/patch_free
$ touch $ORACLE_HOME/.patch_storage/patch_free

4) Verify that “opatch lsinventory” no longer reports the error
$ opatch lsinventory

Issue fixed now, check below output.

$ $ORACLE_HOME/OPatch/opatch lsinventory
………………………
………………………
……………………..
——————————————————————————–
Installed Top-level Products (2):
………………………
………………………
……………………..
OPatch succeeded.
$

Recent Posts

Start typing and press Enter to search