Tuesday, 13 June 2017

OPatch failed with error code 73

Hi, while applying one bug fix to our production database, I had face below error,


#/u01/oracle/product/11.2.0/db_1/OPatch/./opatch apply

Oracle Interim Patch Installer version 11.2.0.3.16
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/oracle/product/11.2.0/db_1
Central Inventory : /u01/oraInventory
from                  : /u01/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.16
OUI version       : 11.2.0.3.0
Log file location : /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-11_12-08-42PM_1.log

Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:

Following executables are active :
/u01/oracle/product/11.2.0/db_1/bin/oracle
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-11_12-08-42PM_1.log

OPatch failed with error code 73

In order to investigate, I have crosschecked generated log file.


# more /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-11_12-08-42PM_1.log
[INFO]   OPatch invoked as follows: 'apply -invPtrLoc /u01/oracle/product/11.2.0/db_1/oraInst.loc '
[INFO]   Oracle Home       : /u01/oracle/product/11.2.0/db_1
         Central Inventory : /u01/oraInventory
            from           : /u01/oracle/product/11.2.0/db_1/oraInst.loc
         OPatch version    : 11.2.0.3.16
         OUI version       : 11.2.0.3.0
         OUI location      : /u01/oracle/product/11.2.0/db_1/oui
         Log file location : /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-11_12-08-42PM_1.log
[INFO]   Patch history file: /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
[INFO]   [OPSR-TIME] Loading raw inventory
[INFO]   Prereq checkPatchApplicableOnCurrentPlatform Passed for patch : 13399711
[INFO]   Start fuser command /usr/sbin/fuser /u01/oracle/product/11.2.0/db_1/bin/oracle at Sun Jun 11 12:08:47 IST 2017
[INFO]   Finish fuser command /usr/sbin/fuser /u01/oracle/product/11.2.0/db_1/bin/oracle at Sun Jun 11 12:08:47 IST 2017
[INFO]Files in use by a process: /u01/oracle/product/11.2.0/db_1/bin/oracle 
PID( 17561 )
[INFO]   Following executables are active :
         /u01/oracle/product/11.2.0/db_1/bin/oracle
[INFO]   Prerequisite check "CheckActiveFilesAndExecutables" failed.
                                    The details are:


                                    Following executables are active :
                                    /u01/oracle/product/11.2.0/db_1/bin/oracle
[SEVERE] OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[INFO]   Finishing UtilSession at Sun Jun 11 12:08:47 IST 2017
[INFO]   Log file location: /u01/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-11_12-08-42PM_1.log
[INFO]   Stack Description: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[INFO]   StackTrace: oracle.opatch.OPatchSessionHelper.runApplyPrereqs(OPatchSessionHelper.java:5917)
[INFO]   StackTrace: oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:911)
[INFO]   StackTrace: oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:347)
[INFO]   StackTrace: oracle.opatch.opatchutil.NApply.process(NApply.java:335)
[INFO]   StackTrace: oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1102)
[INFO]   StackTrace: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[INFO]   StackTrace: sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[INFO]   StackTrace: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[INFO]   StackTrace: java.lang.reflect.Method.invoke(Method.java:597)
[INFO]   StackTrace: oracle.opatch.UtilSession.process(UtilSession.java:352)
[INFO]   StackTrace: oracle.opatch.OPatchSession.process(OPatchSession.java:2537)
[INFO]   StackTrace: oracle.opatch.OPatch.process(OPatch.java:821)
[INFO]   StackTrace: oracle.opatch.OPatch.main(OPatch.java:871)


In the log I come to know, one of the session still logged in, so opatch failed to process further.

#ps -ef|grep -i 17561
oracle 17561     1  0 11:58:22 ?     0:01 oracleprod (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle 22939 18323  0 12:16:36 pts/5     0:00 grep -i 17561

# ptree 17561
17561      oracleprod (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))

# ps -ef|grep -i 17561
  oracle 23113 18323  0 12:17:27 pts/5     0:00 grep -i 17561

I have disconnected that session and process further to apply patch and successfully completed patching.

Hope this blog will help... cheers :)

No comments:

Post a Comment