Oracle 11g rac 集群节点的修复过程
目录
一、问题的产生
用户的双节点 Oracle 11g rac 集群,发现有一个节点宕机,发现集群没有启动。手工启动集群报如下错误:
[root@his02 bin]# ./crsctl start cluster
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Start failed, or completed with errors.
[root@his02 bin]# ./crsctl check css
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Check failed, or completed with errors.
二、修复过程
1、执行 roothas.pl 命令
[root@his02 bin]# cd /u01/app/11.2.0/grid/crs/install
[root@his02 install]# ./roothas.pl -deconfig -force -verbose
Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . .) at crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at crsconfig_lib.pm line 703.
Compilation failed in require at ./roothas.pl line 166.
BEGIN failed--compilation aborted at ./roothas.pl line 166.
执行以上命令时出现错误,重新执行以下格式的命令:
[root@his02 install]# /u01/app/11.2.0/grid/perl/bin/perl /u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
PRCR-1119 : 无法查找 ora.cluster_vip_net1.type 类型的 CRS 资源
PRCR-1068 : 无法查询资源
Cannot communicate with crsd
PRCR-1070 : 无法检查 资源 ora.gsd 是否已注册
Cannot communicate with crsd
PRCR-1070 : 无法检查 资源 ora.ons 是否已注册
Cannot communicate with crsd
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completed with errors.
Successfully deconfigured Oracle clusterware stack on this node
2、执行 root.sh 命令
[root@his02 grid]# ./root.sh
Check /u01/app/11.2.0/grid/install/root_his02_2024-11-13_19-10-14.log for the output of root script
执行过程中查看日志,发现如下错误:
[root@his02 ~]# tail -f /u01/app/11.2.0/grid/install/root_his02_2024-11-13_19-10-14.log
Performing root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/11.2.0/grid
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
[client(50691)]CRS-2101:The OLR was formatted using version 3.
该错误解决方法如下:
(1)新开一个窗口,执行如下命令:
[root@his02 install]# cd /var/tmp/.oracle/
[root@his02 .oracle]# ls
npohasd
[root@his02 .oracle]# dd if=npohasd of=/dev/null bs=1024 count=1
过一段时间,重新查看日志,发现 root.sh 命令已执行完毕,节点添加成功。
[root@his02 ~