环境:centos7.5 + rac 11.2.0.4

一、找不到包错误

Creating /etc/oratab file...
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/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
Failed to create keys in the OLR, rc = 127, Message:
  /u01/11.2.0/grid/bin/clscfg.bin: error while loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory 

Failed to create keys in the OLR at /u01/11.2.0/grid/crs/install/crsconfig_lib.pm line 7660.
/u01/11.2.0/grid/perl/bin/perl -I/u01/11.2.0/grid/perl/lib -I/u01/11.2.0/grid/crs/install /u01/11.2.0/grid/crs/install/rootcrs.pl execution failed

解决方法:

[root@node1 lib64]# cd /lib64 
      
[root@node1 lib64]# ls -lrt libcap.so.2 
lrwxrwxrwx. 1 root root 14 12月 23 21:21 libcap.so.2 -> libcap.so.2.22

[root@web1 node1]# ln -s libcap.so.2.22 libcap.so.1 

[root@node1 lib64]# ls -lrt libcap*
-rwxr-xr-x. 1 root root 18672 Jun 25  2011 libcap-ng.so.0.0.0
-rwxr-xr-x. 1 root root 19016 Dec  8  2011 libcap.so.2.22
lrwxrwxrwx. 1 root root    14 Oct  9 11:14 libcap.so.2 -> libcap.so.2.22
lrwxrwxrwx. 1 root root    18 Oct  9 11:14 libcap-ng.so.0 -> libcap-ng.so.0.0.0
lrwxrwxrwx  1 root root    14 Nov 24 13:17 libcap.so.1 -> libcap.so.2.22

二、ohasd failed to start

报错信息

 。。。
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow: 
2015-05-23 23:37:45.460: 
[client(13782)]CRS-2101:The OLR was formatted using version 3.

问题原因:

因为RHEL 7使用systemd而不是initd运行进程和重启进程,而root.sh通过传统的initd运行ohasd进程。

解决方法:

在RHEL 7中ohasd需要被设置为一个服务,在运行脚本root.sh之前。

步骤如下:

1. 以root用户创建服务文件

touch /usr/lib/systemd/system/ohas.service

chmod 777 /usr/lib/systemd/system/ohas.service

2. 将以下内容添加到新创建的ohas.service文件中

[root@rac1 init.d]# vi /usr/lib/systemd/system/ohas.service

[Unit]
Description=Oracle High Availability Services
After=syslog.target

[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always

[Install]
WantedBy=multi-user.target

3. 以root用户运行下面的命令

systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service


4. 查看运行状态

[root@rac1 init.d]# systemctl status ohas.service
ohas.service - Oracle High Availability Services
   Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled)
   Active: active (running) since Fri 2015-09-11 16:09:05 CST; 3s ago
 Main PID: 6000 (init.ohasd)
   CGroup: /system.slice/ohas.service
           6000 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
           6026 /bin/sleep 10

5.若是还没有执行过root.sh

可能状态如下所示

[root@rac1 init.d]# systemctl status ohas.service
ohas.service - Oracle High Availability Services
   Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled)
   Active: failed (Result: start-limit) since Fri 2015-09-11 16:07:32 CST; 1s ago
  Process: 5734 ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple (code=exited, status=203/EXEC)
 Main PID: 5734 (code=exited, status=203/EXEC)

原因是现在还没有/etc/init.d/init.ohasd文件。

如果还是报ohasd failed to start错误,可能是root.sh脚本创建了init.ohasd之后,ohas.service没有马上启动,解决方法参考以下:

当运行root.sh时,一直刷新/etc/init.d ,直到出现 init.ohasd 文件,马上手动启动ohas.service服务 命令:systemctl start ohas.service
 

三、报错crsconfig_lib.pm line 9379

报错信息

firstnode configuration failed at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 9379

解决方法:

因为还没有/etc/hosts中的hostname和主机名不一致

利用如下语句

hostnamectl set-hostname racd01

四、root.sh卸载失败,缺少Env.pm

报错信息:

[root@rac2 install]# /oracle/app/11.2.0/grid/crs/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 . /oracle/app/11.2.0/grid/crs/install) at crsconfig_lib.pm line 703.
BEGIN failed--compilation aborted at crsconfig_lib.pm line 703.
Compilation failed in require at /oracle/app/11.2.0/grid/crs/install/roothas.pl line 166.
BEGIN failed--compilation aborted at /oracle/app/11.2.0/grid/crs/install/roothas.pl line 166.

解决方法

cp -p $GRID_HOME/perl/lib/5.10.0/Env.pm /usr/lib64/perl5/vendor_perl/

再执行卸载

$GRID_HOME/crs/install/roothas.pl -deconfig -force -verbose

五、当卸载成功后,再次执行报错如下

报错信息

Disk Group CRSDG creation failed with the following message:
ORA-15018: diskgroup cannot be created
ORA-15017: diskgroup "CRSDG" cannot be mounted
ORA-15003: diskgroup "CRSDG" already mounted in another lock name space

原因:在两节点上同时执行了root.sh

解决方法:

两边卸载重装

1 [root@vdb1 /]# cd $ORACLE_HOME/crs/install/  --ORACLE_HOME=/g01/grid/app/11.2.0/grid
2 [root@vdb1 install]# ./rootcrs.pl -deconfig -force -verbose
3 [root@vdb1 install]# ./roothas.pl -deconfig -force -verbose

六、Did not succssfully configure and start ASM at /u01/app/11g/grid/crs/install/crsconfig_lib.pm line 6912

ASM failed to start. Check /u01/app/grid/cfgtoollogs/asmca/asmca-211011PM044944.log for details.

Configuration of ASM ... failed
see asmca logs at /u01/app/grid/cfgtoollogs/asmca for details
Did not succssfully configure and start ASM at /u01/app/11g/grid/crs/install/crsconfig_lib.pm line 6912.
/u01/app/11g/grid/perl/bin/perl -I/u01/app/11g/grid/perl/lib -I/u01/app/11g/grid/crs/install /u01/app/11g/grid/crs/install/rootcrs.pl execution failed

ASM failed to start. Check /u01/app/grid/cfgtoollogs/asmca/asmca-211011PM044944.log for details.

Configuration of ASM ... failed
see asmca logs at /u01/app/grid/cfgtoollogs/asmca for details
Did not succssfully configure and start ASM at /u01/app/11g/grid/crs/install/crsconfig_lib.pm line 6912.
/u01/app/11g/grid/perl/bin/perl -I/u01/app/11g/grid/perl/lib -I/u01/app/11g/grid/crs/install /u01/app/11g/grid/crs/install/rootcrs.pl execution failed

换个名字,不要用date作为磁盘组的名字(另外,任何自定义的object name,请尽量不要使用reserved word

七、oracle执行安装软件时



解决方案
在makefile中添加链接libnnz11库的参数
修改$ORACLE_HOME/sysman/lib/ins_emagent.mk,将
$(MK_EMAGENT_NMECTL)修改为:$(MK_EMAGENT_NMECTL) -lnnz11

 建议修改前备份原始文件
[oracle@ysserver ~]$ cd $ORACLE_HOME/sysman/lib
[oracle@ysserver lib]$ cp ins_emagent.mk ins_emagent.mk.bak
[oracle@ysserver lib]$ vi ins_emagent.mk



进入vi编辑器后  命令模式输入/NMECTL 进行查找,快速定位要修改的行
在后面追加参数-lnnz11        第一个是字母l   后面两个是数字1

参考:【Oracle】Linux7安装11g Error in invoking target 'agent nmhs' of makefile_ITPUB博客

八、附录:

db1:

[root@db1 grid]# /u01/app/11g/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11g/grid

Enter the full pathname of the local bin directory: [/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/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/11g/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Adding Clusterware entries to inittab
CRS-2672: Attempting to start 'ora.mdnsd' on 'db1'
CRS-2676: Start of 'ora.mdnsd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'db1'
CRS-2676: Start of 'ora.gpnpd' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'db1'
CRS-2672: Attempting to start 'ora.gipcd' on 'db1'
CRS-2676: Start of 'ora.gipcd' on 'db1' succeeded
CRS-2676: Start of 'ora.cssdmonitor' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'db1'
CRS-2672: Attempting to start 'ora.diskmon' on 'db1'
CRS-2676: Start of 'ora.diskmon' on 'db1' succeeded
CRS-2676: Start of 'ora.cssd' on 'db1' succeeded

ASM created and started successfully.

Disk Group dbocr created successfully.

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 159c9f16139c4fcdbff411744a31a496.
Successfully replaced voting disk group with +dbocr.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   159c9f16139c4fcdbff411744a31a496 (/dev/asm-ocr1) [DBOCR]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'db1'
CRS-2676: Start of 'ora.asm' on 'db1' succeeded
CRS-2672: Attempting to start 'ora.DBOCR.dg' on 'db1'
CRS-2676: Start of 'ora.DBOCR.dg' on 'db1' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@db1 grid]#

db2:

[root@db2 grid]# /u01/app/11g/grid/root.sh
Performing root user operation for Oracle 11g

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11g/grid

Enter the full pathname of the local bin directory: [/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/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/11g/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to inittab
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node db1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Configure Oracle Grid Infrastructure for a Cluster ... succeeded

来源:

Failed to create keys in the OLR, rc = 127, Message:_小伟的博客-CSDN博客

RHEL 7 安装oracle rac 11.2.0.4执行root.sh报错ohasd failed to start_u010692693的专栏-CSDN博客

在grid安装过程执行root.sh报错crsconfig_lib.pm line 9379_Kay的博客-CSDN博客

root.sh失败,卸载报错_sqlora的专栏-CSDN博客

Oracle11.2.0.4 RAC GI ORA-15003: diskgroup "XXXX" already mounted in another lock name space_weixin_33699914的博客-CSDN博客
安装grid执行root.sh脚本提示asm安装失败 - Oracle新技术 - ITPUB论坛-专业的IT技术社区

【Oracle】Linux7安装11g Error in invoking target 'agent nmhs' of makefile_ITPUB博客

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐