Thursday, September 6, 2018

Oracle patch failed with “CheckActiveFilesAndExecutables” failed error

We are applying patch on Oracle 12c and we got Prerequisite check “CheckActiveFilesAndExecutables” failed error. By looking the error we can see that files are active and used by some active processes.


$opatch apply
.....
[Sep 6, 2018 6:56:10 PM] [INFO] Finish fuser command /sbin/fuser /oracle/product/12.1.0.2/dbhome_1/lib/libsrvm12.so at Thu Sep 06 18:56:10 PDT 2018
[Sep 6, 2018 6:56:10 PM] [SEVERE] OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[Sep 6, 2018 6:56:10 PM] [INFO] Finishing UtilSession at Thu Sep 06 18:56:10 PDT 2018
[Sep 6, 2018 6:56:10 PM] [INFO] Log file location: /oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/opatch2018-09-06_18-55-32PM_1.log
[Sep 6, 2018 6:56:10 PM] [INFO] Stack Description: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
at oracle.opatch.OPatchSessionHelper.runApplyPrereqs(OPatchSessionHelper.java:6670)
at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:988)
at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:363)
at oracle.opatch.opatchutil.NApply.process(NApply.java:343)
at oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at oracle.opatch.UtilSession.process(UtilSession.java:359)
at oracle.opatch.OPatchSession.process(OPatchSession.java:2670)
at oracle.opatch.OPatch.process(OPatch.java:811)
at oracle.opatch.OPatch.main(OPatch.java:861)
Caused by: java.lang.RuntimeException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
... 13 more
Caused by: oracle.opatch.PrereqFailedException: Prerequisite check "CheckActiveFilesAndExecutables" failed.
... 13 more

In the log file I see that below lib is active and used by some processes

[Sep 6, 2018 6:55:49 PM] [INFO] Following executables are active :
/oracle/product/12.1.0.2/dbhome_1/lib/libclntsh.so.12.1
[Sep 6, 2018 6:55:49 PM] [INFO] Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following executables are active :
/oracle/product/12.1.0.2/dbhome_1/lib/libclntsh.so.12.1
[Sep 6, 2018 6:55:49 PM] [INFO] Start fuser command /sbin/fuser /oracle/product/12.1.0.2/dbhome_1/bin/adrci at Thu Sep 06 18:55:49 PDT 2018

To find which process using below lib run below command and you will get the process id

$ /sbin/fuser /oracle/product/12.1.0.2/dbhome_1/lib/libclntsh.so.12.1
/oracle/product/12.1.0.2/dbhome_1/lib/libclntsh.so.12.1: 8631m

Find out the process that is active using below command

$ps –ef |grep 8631     
oracle     8631      1  0 Aug23 ?        00:02:22 /oracle/product/12.1.0.2/dbhome_1/bin/tnslsnr LISTENER_ORCL-inherit

Either you stop the processes or kill the process. Once the processes is stopped you can proceed with opatch again and it should be successful.

Note that after patch is successful check for “SEVERE” errors if any in the log file.

Thanks
Satishbabu Gunukula
http://www.oracleracexpert.com