Wednesday, September 18, 2013

opatch lsinventory fails with exception: null

Today while doing bug fix patch, opatch lsinventory failed with

 opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.10.1
Copyright (c) 2013, Oracle Corporation.  All rights reserved.

exception msg : null


Ran the same command which we have different opatch version i.e 11.1.0.6.2 and below is the error

 opatch lsinventory
Invoking OPatch 11.1.0.6.2

Oracle Interim Patch Installer version 11.1.0.6.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

OPatch could not open log file, logging will not be possible

Oracle Home       : /opt/app/oracle/product/11.1.0
Central Inventory : /opt/app/oracle/oraInventory
   from           : /var/opt/oracle/oraInst.loc
OPatch version    : 11.1.0.6.2
OUI version       : 11.1.0.7.0
OUI location      : /opt/app/oracle/product/11.1.0/oui
Log file location : /opt/app/oracle/product/11.1.0/cfgtoollogs/opatch/opatch2013-09-18_16-38-14PM.log



Inventory load failed... OPatch cannot load inventory for the given Oracle Home.

LsInventorySession failed: LsInventory cannot create the log directory /opt/app/oracle/product/11.1.0/cfgtoollogs/opatch/lsinv/lsinventory2013-09-18_16-38-14PM.txt
java.lang.RuntimeException: LsInventory cannot create the log directory /opt/app/oracle/product/11.1.0/cfgtoollogs/opatch/lsinv/lsinventory2013-09-18_16-38-14PM.txt
        at oracle.opatch.LsInventorySession.init(LsInventorySession.java:217)
        at oracle.opatch.LsInventorySession.loadAndPrintInventory(LsInventorySession.java:373)
        at oracle.opatch.LsInventorySession.process(LsInventorySession.java:324)
        at oracle.opatch.OPatchSession.main(OPatchSession.java:1548)
        at oracle.opatch.OPatch.main(OPatch.java:619)

OPatch failed with error code 73

The opatch directory in $ORACLE_HOME/cfgtoollogs/ is owned by user that doesn't belong to oinstall or dba group:

/opt/app/oracle/product/11.1.0/cfgtoollogs
live @live > ls -ltr
total 12
-rwxrwxrwx   1 oracle     oinstall         0 Aug 17  2010 configToolAllCommands.bak
-rwxrwxrwx   1 oracle     oinstall        57 Aug 17  2010 configToolAllCommands.bak.1
-rwxrwxrwx   1 oracle     oinstall       203 Aug 17  2010 configToolAllCommands
drwxrwxrwx   2 oracle     oinstall      1024 Aug 17  2010 oui
drwxrwxrwx   2 oracle     oinstall      2048 Aug 17  2010 cfgfw
drwxr-xr-x      3 live    cdat           1024 Sep 18 11:37 opatch


Once the permissio has changed to oracle:oinstall

/opt/app/oracle/product/11.1.0/OPatch/opatch
live# opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.10.1
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /opt/app/oracle/product/11.1.0
Central Inventory : /opt/app/oracle/oraInventory
   from           : /opt/app/oracle/product/11.1.0/oraInst.loc
OPatch version    : 11.1.0.10.1
OUI version       : 11.1.0.7.0
Log file location : /opt/app/oracle/product/11.1.0/cfgtoollogs/opatch/opatch2013-09-18_16-44-10PM_1.log

Lsinventory Output file location : /opt/app/oracle/product/11.1.0/cfgtoollogs/opatch/lsinv/lsinventory2013-09-18_16-44-10PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 11g                                                  11.1.0.6.0
Oracle Database 11g Patch Set 1                                      11.1.0.7.0
There are 2 products installed in this Oracle Home.


Interim patches (1) :

Patch  8895202      : applied on Mon Jul 23 00:45:41 BST 2012
Unique Patch ID:  13723022
   Created on 30 May 2012, 04:38:42 hrs PST8PDT
   Bugs fixed:
     8895202



--------------------------------------------------------------------------------

OPatch succeeded.



No comments:

Post a Comment