Friday, May 22, 2020

opatchauto - Prerequisite check "CheckActiveFilesAndExecutables" failed.

Opatchauto failed with error.

 Prerequisite check "CheckActiveFilesAndExecutables" failed.

Following active executables are used by opatch process :
 /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1

Symptom.

[May 22, 2020 8:09:39 AM] [INFO]    Finish fuser command /sbin/fuser /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1 at Fri May 22 08:09:39 UTC 2020
[May 22, 2020 8:09:39 AM] [INFO]    Files in use by a process: /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1 PID( 80610 )
[May 22, 2020 8:09:39 AM] [INFO]    Following active executables are not used by opatch process :
                                   
                                   
                                    Following active executables are used by opatch process :
                                    /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1
[May 22, 2020 8:09:39 AM] [INFO]    Prerequisite check "CheckActiveFilesAndExecutables" failed.
                                    The details are:
                                   
                                   
                                    Following active executables are not used by opatch process :
                                   
                                   
                                    Following active executables are used by opatch process :
                                    /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1
[May 22, 2020 8:09:39 AM] [SEVERE]  OUI-67073:UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
[May 22, 2020 8:09:39 AM] [INFO]    Finishing UtilSession at Fri May 22 08:09:39 UTC 2020
[May 22, 2020 8:09:39 AM] [INFO]    Log file location: /btkrthdb/db/12.1.0.2/cfgtoollogs/opatchauto/core/opatch/opatch2020-05-22_08-09-07AM_1.log
(END)

-------------------------------------
As per above mentioned log file, there are still some processes using one of the files that is being patched. Here executable libclntsh.so.12.1 is still in use.
Find out which os user and pid is holding.

[obtkrth@indelbtd11 ~]$ fuser /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1
/btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1: 80610m

[obtkrth@indelbtd11 ~]$ lsof /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1
COMMAND   PID     USER  FD   TYPE  DEVICE SIZE/OFF    NODE NAME
tnslsnr 80610 obtkrth mem    REG 253,230 58855367 3822203 /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1
-------------------------------------


Now Kill this process to proceed with patching.

[obtkrth@indelbtd11 ~]$ kill -9 80610
[obtkrth@indelbtd11 ~]$ lsof /btkrthdb/db/12.1.0.2/lib/libclntsh.so.12.1
[obtkrth@indelbtd11 ~]$

Now no more process, continue with patching.