准备给19c rac打补丁,发现tfa报错,如下
[root@db1 /]# /u01/app/19.0.0/grid_1/OPatch/opatchauto apply /opt/update/35370167/35319490 -oh /u01/app/19.0.0/grid_1
OPatchauto session is initiated at Sat Oct 28 19:33:56 2023
System initialization log file is /u01/app/19.0.0/grid_1/cfgtoollogs/opatchautodb/systemconfig2023-10-28_07-34-00PM.log.
Session log file is /u01/app/19.0.0/grid_1/cfgtoollogs/opatchauto/opatchauto2023-10-28_07-34-10PM.log
The id for this session is ELDJ
Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid_1
Patch applicability verified successfully on home /u01/app/19.0.0/grid_1
Executing patch validation checks on home /u01/app/19.0.0/grid_1
Patch validation checks successfully completed on home /u01/app/19.0.0/grid_1
Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0.0/grid_1
Prepatch operation log file location: /u01/app/grid/crsdata/db1/crsconfig/crs_prepatch_apply_inplace_db1_2023-10-28_07-34-58PM.log
Failed to bring down CRS service on home /u01/app/19.0.0/grid_1
Execution of [GIShutDownAction] patch action failed, check log for more details. Failures:
Patch Target : db1->/u01/app/19.0.0/grid_1 Type[crs]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/19.0.0/grid_1, host: db1.
Command failed: /u01/app/19.0.0/grid_1/perl/bin/perl -I/u01/app/19.0.0/grid_1/perl/lib -I/u01/app/19.0.0/grid_1/opatchautocfg/db/dbtmp/bootstrap_db1/patchwork/crs/install -I/u01/app/19.0.0/grid_1/opatchautocfg/db/dbtmp/bootstrap_db1/patchwork/xag /u01/app/19.0.0/grid_1/opatchautocfg/db/dbtmp/bootstrap_db1/patchwork/crs/install/rootcrs.pl -prepatch
Command failure output:
Using configuration parameter file: /u01/app/19.0.0/grid_1/opatchautocfg/db/dbtmp/bootstrap_db1/patchwork/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/db1/crsconfig/crs_prepatch_apply_inplace_db1_2023-10-28_07-34-58PM.log
Oracle Clusterware active version on the cluster is [19.0.0.0.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [724960844].
2023/10/28 19:36:00 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.
['COMMON_DATA_DIR', 'TFA_DATA_DIR', 'WORK_DIR', 'DIAG_DIR', 'TFA_DIAG_DIR', 'ORACHK_DIAG_DIR'] point to missing directories
2023/10/28 19:36:00 CLSRSC-4014: Failed to shut down Oracle Trace File Analyzer (TFA) Collector. Grid Infrastructure operations will continue.
fter 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 Sat Oct 28 19:36:02 2023
Time taken to complete the session 2 minutes, 3 seconds
opatchauto failed with error code 42
因为tfa是AHF的一部分,只有升级AHF了
1、升级前查看现有版本
[root@db1 bin]# ./tfactl status
WARNING - TFA Software is older than 180 days. Please consider upgrading TFA to the latest version.
.---------------------------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID | Inventory Status |
+------+---------------+--------+------+------------+----------------------+------------------+
| db1 | RUNNING | 226827 | 5000 | 18.3.3.0.0 | 18330020190315044534 | COMPLETE |
| db2 | RUNNING | 4346 | 5000 | 18.3.3.0.0 | 18330020190315044534 | COMPLETE |
'------+---------------+--------+------+------------+----------------------+------------------'
2、下载AHF-LINUX_v23.7.0.zip报到db1的/root下面
Autonomous Health Framework(AHF) - including TFA and ORAchk/EXAchk (Doc ID 2550798.1)
3、开始安装/升级过程
[root@db1 ~]# unzip AHF-LINUX_v23.7.0.zip -d AHF
[root@db1 ~]# cd ./AHF
[root@db1 AHF]# ./ahf_setup
AHF Installer for Platform Linux Architecture x86_64
AHF Installation Log : /tmp/ahf_install_237000_302027_2023_10_28-21_12_33.log
Starting Autonomous Health Framework (AHF) Installation
AHF Version: 23.7.0 Build Date: 202307281326
TFA is already installed at : /u01/app/19.0.0/grid_1/tfa/db1/tfa_home
Installed TFA Version : 183300 Build ID : 20190315044534
Default AHF Location : /opt/oracle.ahf
Do you want to install AHF at [/opt/oracle.ahf] ? [Y]|N : y
AHF Location : /opt/oracle.ahf
AHF Data Directory stores diagnostic collections and metadata.
AHF Data Directory requires at least 5GB (Recommended 10GB) of free space.
Choose Data Directory from below options :
1. /u01/app/grid [Free Space : 136536 MB]
2. Enter a different Location
Choose Option [1 - 2] : 1
AHF Data Directory : /u01/app/grid/oracle.ahf/data
Shutting down TFA : /u01/app/19.0.0/grid_1/tfa/db1/tfa_home
Copying TFA Data Files from /u01/app/19.0.0/grid_1/tfa/db1/tfa_home
Uninstalling TFA : /u01/app/19.0.0/grid_1/tfa/db1/tfa_home
Do you want to add AHF Notification Email IDs ? [Y]|N : N
AHF will also be installed/upgraded on these Cluster Nodes :
1. db2
The AHF Location and AHF Data Directory must exist on the above nodes
AHF Location : /opt/oracle.ahf
AHF Data Directory : /u01/app/grid/oracle.ahf/data
Do you want to install/upgrade AHF on Cluster Nodes ? [Y]|N :
Extracting AHF to /opt/oracle.ahf
Configuring TFA Services
Copying TFA Data Files to AHF
Discovering Nodes and Oracle Resources
Starting TFA Services
Created symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service -> /etc/systemd/system/oracle-tfa.service.
Created symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service -> /etc/systemd/system/oracle-tfa.service.
.--------------------------------------------------------------------------.
| Host | Status of TFA | PID | Port | Version | Build ID |
+------+---------------+--------+------+------------+----------------------+
| db1 | RUNNING | 308727 | 5000 | 23.7.0.0.0 | 23700020230728132609 |
| db2 | RUNNING | 4346 | 5000 | 18.3.3.0.0 | 18330020190315044534 |
'------+---------------+--------+------+------------+----------------------'
Running TFA Inventory...
Adding default users to TFA Access list...
.------------------------------------------------------------.
| Summary of AHF Configuration |
+-----------------+------------------------------------------+
| Parameter | Value |
+-----------------+------------------------------------------+
| AHF Location | /opt/oracle.ahf |
| TFA Location | /opt/oracle.ahf/tfa |
| Orachk Location | /opt/oracle.ahf/orachk |
| Data Directory | /u01/app/grid/oracle.ahf/data |
| Repository | /u01/app/grid/oracle.ahf/data/repository |
| Diag Directory | /u01/app/grid/oracle.ahf/data/db1/diag |
'-----------------+------------------------------------------'
Starting ORAchk Scheduler from AHF
Setting up AHF CLI and SDK
AHF install completed on db1
Installing AHF on Remote Nodes :
AHF will be installed on db2, Please wait.
AHF will prompt twice to install/upgrade per Remote Node. So total 2 prompts
Do you want to continue Y|[N] : y
AHF will continue with Installing on remote nodes
Installing AHF on db2 :
[db2] Copying AHF Installer
root@db2's password:
[db2] Running AHF Installer
root@db2's password:
AHF binaries are available in /opt/oracle.ahf/bin
AHF is successfully Installed
Do you want AHF to store your My Oracle Support Credentials for Automatic Upload ? Y|[N] :
Moving /tmp/ahf_install_237000_302027_2023_10_28-21_12_33.log to /u01/app/grid/oracle.ahf/data/db1/diag/ahf/
查看AHF版本及状态(任何节点)
# ahfctl statusahf
继续打补丁
[root@db1 /]# /u01/app/19.0.0/grid_1/OPatch/opatchauto resume
tfactl toolstatus
tfactl diagcollect -srdc DBASM
MOS Tfactl Failed With TFA-00201 (Doc ID 2659786.1) 建议卸载重装。