代码改变世界

Redhat 7.6安装11G RAC GI时遇到此类报错

2020-03-20 15:35  狂澜与玉昆0950  阅读(1444)  评论(0编辑  收藏  举报

环境:Redhat Linux 7.6 + Oracle 11.2.0.4 RAC

现象:图像化安装过程中,按照提示执行root.sh脚本,报错中断。

1. 具体现象

[root@mm1903 ~]# /u01/app/11.2.0/grid/root.sh
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

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow: 
2020-03-20 11:46:34.715: 
[client(14293)]CRS-2101:The OLR was formatted using version 3.
2020-03-20 11:57:25.130: 
[ohasd(15204)]CRS-0715:Oracle High Availability Service has timed out waiting for init.ohasd to be started.

/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed
[root@mm1903 ~]# 

Redhat 7.6搭建11g RAC时遇到报错:

[ohasd(15204)]CRS-0715:Oracle High Availability Service has timed out waiting for init.ohasd to be started.

2. 定位问题

官方文档:
Install of Clusterware fails while running root.sh on OL7 - ohasd fails to start (Doc ID 1959008.1)

由此篇官方文档可知,致使root.sh脚本执行时报的原因是因为Linux 7与Linux 6启动/重新启动进程并将其作为服务运行的方式不同。

Linux 6是由initd启动进程,而Linux 7则是由systemd启动进程。

在11.2.0.4 & 12.1.0.1安装GI时,无法加载集群资源进程,所以不会成功。

若想要在Linux 7上运行此两个版本GI软件,需要应用补丁程序18370031。

Because Oracle Linux 7 (and Redhat 7) use systemd rather than initd for starting/restarting processes and runs them as a service the current software install of both 11.2.0.4 & 12.1.0.1 will not succeed because the ohasd process does not start properly.

In OL7 it needs to be set up as a service and patch fix for Bug 18370031 needs to be applied for this , BEFORE you run root.sh when prompted .

3. 解决问题

此外还有中简单有效的解决方法,也是永久性的:

修改ohasd守护进程文件 vi /etc/init.d/ohasd
在文件中找到如这部分,在里面添加标注部分:
————————————————
if [ -r $AUTOSTARTFILE ]
  then
    case `$CAT $AUTOSTARTFILE` in
      enable*)
        $LOGERR "Oracle HA daemon is enabled for autostart." 
        /bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1 &      ---标注
        my_crsctl start has -nowait
    sleep 600                                                                   ---标注
    ps -ef | grep dd| grep hasd|awk '{print $2}'|xargs kill -9                  ---标注
        ;;
      disable*)
        $LOGERR "Oracle HA daemon is disabled for autostart." 
        ;;
      *)
        $LOGERR "Oracle HA daemon is disabled by damaged install."
        $LOGERR "Unexpected settings found in $AUTOSTARTFILE."
        ;;
    esac
  else
————————————————

服务器再次重启后,稍等片刻集群即会正常启动。

正常加载日志:

[root@mm1903 ~]# /u01/app/11.2.0/grid/root.sh
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

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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
CRS-2672: Attempting to start 'ora.mdnsd' on 'mm1903'
CRS-2676: Start of 'ora.mdnsd' on 'mm1903' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'mm1903'
CRS-2676: Start of 'ora.gpnpd' on 'mm1903' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'mm1903'
CRS-2672: Attempting to start 'ora.gipcd' on 'mm1903'
CRS-2676: Start of 'ora.cssdmonitor' on 'mm1903' succeeded
CRS-2676: Start of 'ora.gipcd' on 'mm1903' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'mm1903'
CRS-2672: Attempting to start 'ora.diskmon' on 'mm1903'
CRS-2676: Start of 'ora.diskmon' on 'mm1903' succeeded
CRS-2676: Start of 'ora.cssd' on 'mm1903' succeeded

已成功创建并启动 ASM。

已成功创建磁盘组DATA。

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 64770444e9ea4fd6bf277198410f1b10.
Successfully replaced voting disk group with +DATA.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   64770444e9ea4fd6bf277198410f1b10 (/dev/asm-diskb) [DATA]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'mm1903'
CRS-2676: Start of 'ora.asm' on 'mm1903' succeeded
CRS-2672: Attempting to start 'ora.DATA.dg' on 'mm1903'
CRS-2676: Start of 'ora.DATA.dg' on 'mm1903' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@mm1903 ~]# su - grid
上一次登录:五 3月 20 12:55:20 CST 2020pts/2[grid@mm1903 ~]$ 
View Code