记录在linux 7中安装11.2.0.4 RAC遇到问题

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:记录在linux 7中安装11.2.0.4 RAC遇到问题

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

还有客户要求在linux 7平台中安装11.2.0.4的RAC,在这次的安装过程中,参考了Installation walk-through – Oracle Grid/RAC 11.2.0.4 on Oracle Linux 7 (Doc ID 1951613.1)文档,在安装grid的时候,执行root.sh执行,打上了patch 18370031,root.sh脚本非常顺利执行成功
打patch 18370031操作
一定要在gi安装执行root.sh之前打该patch

[grid@ptdb1 soft]$ $ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tmp/soft/18370031
Oracle Interim Patch Installer version 11.2.0.3.27
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.27
OUI version       : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2021-05-19_20-06-19PM_1.log

Verifying environment and performing prerequisite checks...

--------------------------------------------------------------------------------
Start OOP by Prereq process.
Launch OOP...

Oracle Interim Patch Installer version 11.2.0.3.27
Copyright (c) 2021, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/11.2.0/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/11.2.0/grid/oraInst.loc
OPatch version    : 11.2.0.3.27
OUI version       : 11.2.0.4.0
Log file location : /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2021-05-19_20-06-40PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   18370031  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/11.2.0/grid')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '18370031' to OH '/u01/app/11.2.0/grid'

Patching component oracle.crs, 11.2.0.4.0...
Patch 18370031 successfully applied.
Log file location: /u01/app/11.2.0/grid/cfgtoollogs/opatch/opatch2021-05-19_20-06-40PM_1.log

OPatch succeeded.

两个节点执行root.sh操作

[root@ptdb1 rpm]# /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]: 
   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/11.2.0/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 oracle-ohasd.service
CRS-2672: Attempting to start 'ora.mdnsd' on 'ptdb1'
CRS-2676: Start of 'ora.mdnsd' on 'ptdb1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'ptdb1'
CRS-2676: Start of 'ora.gpnpd' on 'ptdb1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ptdb1'
CRS-2672: Attempting to start 'ora.gipcd' on 'ptdb1'
CRS-2676: Start of 'ora.cssdmonitor' on 'ptdb1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'ptdb1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'ptdb1'
CRS-2672: Attempting to start 'ora.diskmon' on 'ptdb1'
CRS-2676: Start of 'ora.diskmon' on 'ptdb1' succeeded
CRS-2676: Start of 'ora.cssd' on 'ptdb1' succeeded

ASM created and started successfully.

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


--节点2
[root@ptdb2 ~]# /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]: 
   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/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to oracle-ohasd.service
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node ptdb1,
     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

不安装该patch的,手动在systemd中添加ohasd服务
在root.sh执行过程中,待/etc/init.d/目录下生成了init.ohasd 文件后执行systemctl start ohasd.service 启动ohasd服务即可。若没有/etc/init.d/init.ohasd文件 systemctl start ohasd.service 则会启动失败,如果没有及时启动ohasd服务,导致root.sh执行失败,可以在启动ohasd服务之后,重新执行root.sh

(1).创建一个空服务文件:/usr/lib/systemd/system/ohasd.service
touch /usr/lib/systemd/system/ohasd.service

(2).编辑文件ohasd.service添加如下内容
vi /usr/lib/systemd/system/ohasd.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).添加和启动服务
systemctl daemon-reload
systemctl enable ohasd.service
systemctl start ohasd.service

安装db软件时无法发现节点
20210519203812


通过参考mos文档 Database runInstaller “Nodes Selection” Window Does Not Show Cluster Nodes (Doc ID 1327486.1),应该是在安装过程中inventory信息异常导致,采用一下方法解决

[grid@ptdb1 bin]$ pwd
/u01/app/11.2.0/grid/oui/bin
[grid@ptdb1 bin]$ ./runInstaller -silent -ignoreSysPrereqs -updateNodeList 
>ORACLE_HOME=$ORACLE_HOME LOCAL_NODE="ptdb1" CLUSTER_NODES="{ptdb1,ptdb2}" CRS=true
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 8062 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.

INS-35423错误解决
20210519204306


通过查询mos发现Window: Prerequisite Error INS-35423 And Warnings When Installing RAC Database Software (Doc ID 2164220.1)文章,虽然该文章描述的是windows环境,根据经验,我这个情况类似,按照该方法处理后正常

./runInstaller -jreLoc /etc/alternatives/jre_1.8.0 ORACLE_HOSTNAME="ptdb1"

安装db遇到Error in invoking target ‘agent nmhs’ of makefile ‘
这个是一个特别常见的错误,如果不使用dbcontrol,该错误可以直接忽略,或者采用类似方法处理
对$ORACLE_HOME/sysman/lib/ins_emagent.mk文件中的$(MK_EMAGENT_NMECTL)修改为$(MK_EMAGENT_NMECTL) -lnnz11,然后重试
20210519210048


如果要使用db console,如果在数据库安装完成之后打上patch 19692824
参考mos文档Installation of Oracle 11.2.0.4 Database Software on OL7 fails with ‘Error in invoking target ‘agent nmhs’ of makefile ‘ & “undefined reference to symbol ‘B_DestroyKeyObject’” error (Doc ID 1965691.1)