重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 127|回复: 0

[Oracle] ohasd failed to start

[复制链接]
发表于 2022-6-17 13:43:22 | 显示全部楼层 |阅读模式
系统:CentOS7.9
问题描述:单实例安装GI,在执行/u01/app/grid/product/11.2.0/grid/root.sh脚本时,报错ohasd failed to start at/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 377,<ALERTLOG> line 4,如下所示:
5452062ac141169997.png
[root@leo etc]#/u01/app/grid/product/11.2.0/grid/root.sh
Performing root user operation for Oracle11g
The following environment variables areset as:
   ORACLE_OWNER= grid
   ORACLE_HOME= /u01/app/grid/product/11.2.0/grid
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
  Copying dbhome to /usr/local/bin ...
  Copying oraenv to /usr/local/bin ...
  Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of rootscript.
Now product-specific root actions will beperformed.
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCRkeys.
Creating OCR keys for user 'root', privgrp'root'..
Operation successful.
CRS-4664: Node leo successfully pinned.
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20lines of the alert log follow:
2022-06-01 13:28:58.011:
[client(6481)]CRS-2101:The OLR wasformatted using version 3.
2022-06-01 13:28:58.270:
[client(6508)]CRS-1001:The OCR wasformatted using version 3.
ohasdfailed to start at /u01/app/grid/product/11.2.0/grid/crs/install/roothas.plline 377, <ALERTLOG> line 4.
/u01/app/grid/product/11.2.0/grid/perl/bin/perl-I/u01/app/grid/product/11.2.0/grid/perl/lib-I/u01/app/grid/product/11.2.0/grid/crs/install/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl execution failed

解决方案:
先执行/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl-deconfig -force -verbose命令,回退root.sh脚本
[root@leo etc]#/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl -deconfig -force-verbose
Can't locate Env.pm in @INC (@INCcontains: /usr/local/lib64/perl5 /usr/local/share/perl5/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5/usr/share/perl5 . /u01/app/grid/product/11.2.0/grid/crs/install) at/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_lib.pm line 703.
Compilation failed in require at/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 166.
BEGIN failed--compilation aborted at/u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl line 166.
如上,回退root.sh脚本时,报错Can'tlocate Env.pm in @INC (@INC contains,该报错是由bug18650453导致的,
解决方案两个:
a、补丁程序18650453:OL7: CLUSTERWARE ROOT SCRIPTS FAIL DUE TO: CAN'T LOCATE ENV.PM IN @INC
b、使用gi中绝对路径perl,清空ocr配置和votingdisk
此处采用方案b.
[root@leo ~]# /u01/app/grid/product/11.2.0/grid/perl/bin/perl  /u01/app/grid/product/11.2.0/grid/crs/install/roothas.pl-deconfig -force
Using configuration parameter file:/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle HighAvailability Services
CRS-4000: Command Stop failed, orcompleted with errors.
CRS-4639: Could not contact Oracle HighAvailability Services
CRS-4000: Command Delete failed, orcompleted with errors.
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, orcompleted with errors.
Successfully deconfigured Oracle Restartstack

回到最初问题,当执行root.sh脚本出现“AddingClusterware entries to inittab”字样时,需在另一个sessionroot用户执行dd if=/var/tmp/.oracle/npohasdof=/dev/null bs=1024 count=1命令
实际操作过程如下:
[root@leo ~]#/u01/app/grid/product/11.2.0/grid/root.sh
Performing root user operation for Oracle11g
The following environment variables areset as:
   ORACLE_OWNER= grid
   ORACLE_HOME= /u01/app/grid/product/11.2.0/grid
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
The contents of "dbhome" havenot changed. No need to overwrite.
The contents of "oraenv" havenot changed. No need to overwrite.
The contents of "coraenv" havenot changed. No need to overwrite.
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of rootscript.
Now product-specific root actions will beperformed.
Using configuration parameter file:/u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCRkeys.
Creating OCR keys for user 'root', privgrp'root'..
Operation successful.
CRS-4664: Node leo successfully pinned.
AddingClusterware entries to inittab (说明:出现该提示后,立即在另一个sessionroot用户执行ddif=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1命令)
leo    2022/06/01 13:57:50    /u01/app/grid/product/11.2.0/grid/cdata/leo/backup_20220601_135750.olr
Successfully configured Oracle GridInfrastructure for a Standalone Server
[root@leo ~]# ddif=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

如上所示,root.sh成功执行.

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2022-8-11 13:14 , Processed in 0.090783 second(s), 24 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表