Stop TFA before applying the patches...

During the apply of RU patch on Oracle 12.2 opatchauto apply was failing with below errors.
Environment was single instance ASM standby database.
 Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:  
 Patch Target : racadrdb1->/u01/app/oracle/product/12.2.0/dbhome_1 Type[sidb]  
 Details: [  
 ---------------------------Patching Failed---------------------------------  
 Command execution failed during patching in home: /u01/app/oracle/product/12.2.0/dbhome_1, host: racadrdb1.  
 Command failed: /u01/app/oracle/product/12.2.0/dbhome_1/OPatch/opatchauto apply /tmp/JAN2019/28828733 -oh /u01/app/oracle/product/12.2.0/dbhome_1 -target_type oracle_database -binary -invPtrLoc /u01/app/12.2.0.1/grid12c/grid/oraInst.loc -jre /u01/app/12.2.0.1/grid12c/grid/OPatch/jre -persistresult /u01/app/oracle/product/12.2.0/dbhome_1/OPatch/auto/dbsessioninfo/sessionresult_racadrdb1_sidb.ser -analyzedresult /u01/app/oracle/product/12.2.0/dbhome_1/OPatch/auto/dbsessioninfo/sessionresult_analyze_racadrdb1_sidb.ser  
 Command failure output:  
 ==Following patches FAILED in apply:  
 Patch: /tmp/JAN2019/28828733/28822515  
 Log: /u01/app/oracle/product/12.2.0/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2019-07-29_15-07-52PM_1.log  
 Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: Prerequisite check "CheckActiveFilesAndExecutables" failed.  
 After fixing the cause of failure Run opatchauto resume  
 ]  
 OPATCHAUTO-68061: The orchestration engine failed.  
 OPATCHAUTO-68061: The orchestration engine failed with return code 1  
 OPATCHAUTO-68061: Check the log for more details.  
 OPatchAuto failed.  
 OPatchauto session completed at Mon Jul 29 15:08:07 2019  
 Time taken to complete the session 1 minute, 33 seconds  
  opatchauto failed with error code 42  
 root@racadrdb1 #  
After going through the logs the culprit was external process which was using the Oracle homes.
Finding the processes which are using the homes,
 root@racadrdb1 # fuser -c /u01  
 /u01:   7423ctom  2070tom  
 root@racadrdb1 #   
TFA was the process which was operating from Oracle Home
 root@racadrdb1 # ps -ef | grep -i 2070  
   root 11390 11162  0 15:18:49 pts/3    0:00 grep -i 2070  
   root 2070   1  0  Nov 14 ?    2633:02 /u01/app/oracle/tfa/racadrdb1/tfa_home/jre/bin/java -Xms128m -Xmx512m oracle.rat.tfa.TFAMain /u01/app/oracle/tfa/racadrdb1/tfa_                              home  
 root@racadrdb1 #  
 root@racadrdb1 # /u01/app/oracle/tfa/racadrdb1/tfa_home/bin/tfactl status  
 .--------------------------------------------------------------------------------------------------.  
 | Host   | Status of TFA | PID  | Port | Version  | Build ID       | Inventory Status |  
 +-----------+---------------+-------+-------+------------+----------------------+------------------+  
 | racadrdb1 | RUNNING    | 11444 | 51235 | 12.2.1.0.0 | 12210020161122170355 | COMPLETE     |  
 '-----------+---------------+-------+-------+------------+----------------------+------------------'  
 root@racadrdb1 # /u01/app/oracle/tfa/racadrdb1/tfa_home/bin/tfactl stop  
 Stopping TFA from the Command Line  
 TFA is running - Will wait 5 seconds (up to 3 times)  
 TFA is running - Will wait 5 seconds (up to 3 times)  
 TFA is running - Will wait 5 seconds (up to 3 times)  
 TFAmain Force Stopped Successfully  
 TFA Stopped Successfully  
 . . .  
 Successfully stopped TFA..  
 root@racadrdb1 #   
Once TFA was stopped, resuming opath successfully applied all patches on both database and grid homes.


Comments

Popular posts from this blog

ORA-16433: The database or pluggable database must be opened in read/write

Oracle Multitenant - Create new service for PDB using DBMS_SERVICE

Wait for unread message on broadcast channel - Blocking Sessions