Showing posts with label OPatch failed with error code 73. Show all posts
Showing posts with label OPatch failed with error code 73. Show all posts

Saturday, 16 June 2012

Opatch error - OPatch failed with error code 73

Recently when patching one of the instances in a RAC environment, received below error during
$opatch lsinventory


OracleHomeInventory::createInventoryObj() construction done
LsInventory::loadAndPrintInventory()
Retrieving inventory from Oracle Home...
OracleHomeInventory::load()
Inventory load failed... OPatch cannot load inventory for the given Oracle Home.
Possible causes are:
   Oracle Home dir. path does not exist in Central Inventory
   Oracle Home is a symbolic link
   Oracle Home inventory is corrupted
Locker::release()
OUISessionManager::unRegister()
Un-Registering the caller : OPatch
LsInventory::getInstance() returns
LsInventorySession failed: OracleHomeInventory gets null oracleHomeInfo
Cleaning up the directory : "/u01/app/oracle/DEV/db/tech_st/11.2.0.2/.patch_storage/patch_unzip"...

OPatch failed with error code 73

Initially compared ContentsXML on other 2 nodes of the RAC and couldn't find much of differences...

Here the issue was that the opatch was checking on the ORACLE_HOME as below


[oracle@ora-rac01 ]$ opatch lsinventory
Invoking OPatch 11.2.0.1.1

Oracle Interim Patch Installer version 11.2.0.1.1
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/DEV/db/tech_st/11.2.0.2
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.1
OUI version       : 11.2.0.2.0


These commands would provide details about the issue.

$ORACLE_HOME/OPatch/opatch lsinventory -all
$ORACLE_HOME/OPatch/opatch lsinventory -detail
export OPATCH_DEBUG=TRUE
$ORACLE_HOME/OPatch/opatch lsinventory > error_details.lst



ORACLE_HOME that was referenced by the opatch did not exist in ContentsXML file, So we need to attach this ORACLE_HOME to inventory for the opatch to succeed, using the below command..

Note : Before proceeding, please make a back up of your central inventory, location can be picked from /etc/oraInst.loc

from $ORACLE_HOME/oui/bin


 ./runInstaller -silent -local -ignoreSysPrereqs -attachHome ORACLE_HOME="/u01/app/oracle/DEV/db/tech_st/11.2.0.2" ORACLE_HOME_NAME="DEV1_DB__u01_app_oracle_DEV1_db_tech_st_11_2_0_2" CLUSTER_NODES=ora-rac01,ora-rac02,ora-rac03 LOCAL_NODE=ora-rac01

this should attach the ORACLE_HOME to the local node and opatch lsinventory run would be successful.

Note : This is purely to share the experience and anticipating this article would help some one in similar situations. Please be cautious when working on your environments.