Search Blog Post

Tuesday, March 25, 2014

OPatch failed with error code 73

Problem:
While checking the inventory details in my database, I got the error below:
$ cd $ORACLE_HOME/OPatch
$ ./opatch lsinventory
Invoking OPatch 11.2.0.1.7
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.
Oracle Home       : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1
Central Inventory : /etc/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-03-24_14-53-27PM.log
OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
LsInventorySession failed: OPatch failed to locate Central Inventory.
Possible causes are:
    The Central Inventory is corrupted
    The oraInst.loc file specified is not valid.
OPatch failed with error code 73

Possibilities: 
  • The Central Inventory is corrupted
  • The oraInst.loc file specified is not valid
Workaround:
·         With the help of Doc ID 295185.1, I tried to recreate the global inventory.
  • Checked oraInst.loc to see the location of global inventory,
# cat /etc/oraInst.loc
inventory_loc=/etc/oracle/oraInventory
inst_group=dba
  • Rename the corrupted global oraInventory with a different name
cd /etc/oracle
mv oraInventory oraInventory.ori
  • Download patch p5035661_11i_LINUX.zip, while trying to apply the patch it gives me this error:
$ cd appsoui/setup/
gdtstdb1.tireco.com:/mnt/TSTapps/patches/appsoui/setup>ls -lrt
total 28
-rw-r--r-- 1 oraTST dba  6361 Nov 30  2004 OUIsetup.pl
-rw-r--r-- 1 oraTST dba 13464 May 12  2005 OUISetup.jar
-rw-r--r-- 1 oraTST dba   459 Mar 24 14:46 OUIsetup.log
gdtstdb1.tireco.com:/mnt/TSTapps/patches/appsoui/setup>perl OUIsetup.pl
Derived ORACLE_HOME(CWD) = /mnt/TSTapps/patches
ENV RDBMS ORACLE_HOME    = /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1
 Using ORACLE_HOME from ENV settings
ERROR: Could not find XML Parser java at:
        /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/xmlparserv2.zip
 Download the OUI patch again and unzip if the file is missing.
  
Note: I have downloaded this patch thrice and tried the same thing, but same error occur always.
  •  I just tried one more time and got a different error this time
$ cd $ORACLE_HOME/appsoui/setup
$ perl OUIsetup.pl
        ORACLE_HOME  : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1 (APPSDB_TRCTST)
        OUI Location : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui
        CLASSPATH    : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/setup/OUISetup.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/OraInstaller.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/xmlparserv2.jar
        JRE_INST     : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/jre/1.1.8
 Executing OUI setup now:
/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/jre/1.3.1/bin/java -classpath /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/setup/OUISetup.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/OraInstaller.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/xmlparserv2.jar -DDEBUG_MODE=false oracle.apps.ad.util.OUISetup /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1 /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/jre/1.1.8 APPSDB_TRCTST
 /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/jre/1.3.1/bin/x86_64/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
  • Then I verified if the following RPM is installed or not
            [root@gdtstdb1 ~]# rpm -qa libstdc++
            libstdc++-4.1.2-52.el5_8.1
            libstdc++-4.1.2-52.el5_8.1
 
  • Created a soft link to fix the issue
            [root@gdtstdb1 ~]# cd /usr/bin
            ln -s libstdc++-libc6.2-2.so.3 libstdc++-libc6.1-1.so.2
  • Also, ran ldconfig command as root ( which sets up the links to the shared libraries) 
  • Now applied the patch one more time, and it went through this time.
$ cd $ORACLE_HOME/appsoui/setup
$ perl OUIsetup.pl
  ORACLE_HOME : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1 (APPSDB_TRCTST)
  OUI Location : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui
CLASSPATH : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/setup/OUISetup.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/OraInstaller.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/xmlparserv2.jar
  JRE_INST : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/jre/1.1.8

Executing OUI setup now:
/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/jre/1.3.1/bin/java -classpath /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/setup/OUISetup.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/OraInstaller.jar:/mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui/lib/xmlparserv2.jar -DDEBUG_MODE=false oracle.apps.ad.util.OUISetup /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1 /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/oui /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/jre/1.1.8 APPSDB_TRCTST

Log file : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/appsoui/setup/OUIsetup.log
Checking inventory ...
Updating registration of ORACLE_HOME in global inventory...
Oracle home registration completed.
Removing OUI entries from the global inventory: /etc/oracle/oraInventory/ContentsXML/comps.xml
Registering the OUI component with local inventory...
OUI 2.2 registration completed.

$./opatch lsinventory
Invoking OPatch 11.2.0.1.7
 Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.
Oracle Home       : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1
Central Inventory : /etc/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-03-24_15-34-00PM.log
Lsinventory Output file location : /mnt/TSTapps/oracle/trctstdb/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2014-03-24_15-34-00PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (2):
Oracle Database 11g                                                  11.2.0.3.0
Oracle Database 11g Examples                                         11.2.0.3.0
There are 2 products installed in this Oracle Home.
Interim patches (7) :
Patch  13366268     : applied on Wed Aug 08 14:48:42 PDT 2012
Unique Patch ID:  14394336
   Created on 21 Dec 2011, 08:14:06 hrs PST8PDT
   Bugs fixed:
    13366268
Patch  13258936     : applied on Wed Aug 08 14:48:21 PDT 2012
Unique Patch ID:  14465000
   Created on 5 Dec 2011, 02:41:32 hrs PST8PDT
   Bugs fixed:
     13258936
Patch  13004894     : applied on Wed Aug 08 14:47:50 PDT 2012
Unique Patch ID:  14175139
   Created on 14 Oct 2011, 03:35:11 hrs PST8PDT
   Bugs fixed:
     13004894
Patch  13001379     : applied on Wed Aug 08 14:47:15 PDT 2012
Unique Patch ID:  14706905.1
   Created on 28 Mar 2012, 11:30:01 hrs PST8PDT
   Bugs fixed:
     13001379
Patch  12985184     : applied on Wed Aug 08 14:46:51 PDT 2012
Unique Patch ID:  14296756
   Created on 30 Nov 2011, 15:18:06 hrs PST8PDT
   Bugs fixed:
     12985184
Patch  12960302     : applied on Wed Aug 08 14:46:17 PDT 2012
Unique Patch ID:  14254250
   Created on 10 Nov 2011, 02:40:18 hrs PST8PDT
   Bugs fixed:
     12960302
Patch  9858539      : applied on Wed Aug 08 14:45:06 PDT 2012
Unique Patch ID:  14308099
   Created on 28 Nov 2011, 01:07:44 hrs PST8PDT
   Bugs fixed:
     9858539
--------------------------------------------------------------------------------
OPatch succeeded. 
  • If the issue still persists, you can perform detachHome and attachHome command to reattch your home to central inventory, that will resolve this issue.
./runInstaller -silent -detachHome ORACLE_HOME="<Oracle_Home_Location>" ORACLE_HOME_NAME="<Name_Of _Oracle_Home>"
./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="<Oracle_Home_Location>" ORACLE_HOME_NAME="<Name_Of_Oracle_Home>"

References:
ORACLE_HOME could not be registered in the Global Inventory [Article ID 298993.1]
How to Recreate the Global oraInventory [Article ID 295185.1]
HTH
Thanks for reading..!!

No comments:

Post a Comment