首页 » Cloud, ORACLE 9i-23ai » RHEL7(Linux7)安装Oracle 12c RAC 问题小结

RHEL7(Linux7)安装Oracle 12c RAC 问题小结

之前总结过一篇RHEL7(Linux7)安装Oracle 11g R2(11.2.0.4) RAC 问题小结, 这里记录一个12c安装姊妹篇, 现阶段oracle数据库版本虽然已经不在主推12c,但存在一些客户安装12c时的问题, 这个版本确实存在很多不成熟的地方,在DB安装OUI阶段可能就几个问题。

1,ASM device sharedness check

在OUI Step#16检查时提示 ASM device sharedness check, 使用dd 测试先确认asm disk device确实可以read,   bug 25784424

2, CLSRSC-400: A system reboot is required to continue installing

在执行root.sh 的14#时出现报错:CLSRSC-400: A system reboot is required to continue installing, bug 25078431

解决:

针对1和2问题在setup时同时应用PSU,可绕过

./gridSetup.sh -applyPSU /oraru/33559966/33583921

3,   CLSRSC-614: failed to get the list of configured diskgroupsDied

在修复了上面的两个问题后在root.sh的19# 提示

2022/10/15 15:49:29 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2022/10/15 15:54:03 CLSRSC-614: failed to get the list of configured diskgroupsDied at /u01/app/12.2.0/grid_1/crs/install/oraasm.pm line 2069.

MOS ID 2414241.1

解决:

当出现执行 root.sh 提示框后执行以下命令,需在两个节点以 root 身份执行该命令,GRID_HOME 路径请根据实际情况填写

/usr/bin/make -f /u01/app/12.2.0/grid_1/rdbms/lib/ins_rdbms.mk client_sharedlib libasmclntsh12.ohso libasmperl12.ohso ORACLE_HOME=/u01/app/12.2.0/grid_1

所有节点执行完之后,再执行 root.sh 脚本。

/u01/app/oraInventory/orainstRoot.sh
/u01/app/12.2.0/grid_1/root.sh

4, [INS-08101] Unexpected error while executing the action at state: ‘performChecks’. OUI log shows : Caused by:  java.lang.NullPointerException

DB安装OUI时提示ins-08101终止, Bug 24736511

Database installation fails during runcluvfy pre-requisite checks with Error: [INS-08101] Unexpected error while executing the action at state: 'performChecks'. 
 OUI log shows :
 Caused by: java.lang.NullPointerException 

解决:
目录权限从750改为755

ls -ld /opt/oracle
chmod 755 /opt/oracle

还有可能是安装在较新的OS时,clufy还未认证,如suse15 Bug 28912188 INS-08101 Unexpected error during Grid Install on SUSE 15 OS
5,Verifying User Equivalence …FAILED (PRVG-2019, PRKC-1191) PRVF-4009 : User equivalence is not set for nodes
SSH 配置认证不通过

Verifying User Equivalence ...FAILED (PRVG-2019, PRKC-1191)
PRVF-4009 : User equivalence is not set for nodes: Node01
Verification will proceed with nodes: Node02

The directories /home/oracle/.ssh and /home/grid/.ssh has many entries in known_hosts and authorized_keys files. These entries are from previous failed attempts and not cleared.

su - root
# rm -rf /home/oracle/.ssh/*
# rm -rf /home/grid/.ssh/*

 

6, SEVERE: com.jcraft.jsch.JSchException: Algorithm negotiation fail

Linux 7.9 在安装数据库之前升级了openssh 到9.0p,默认为7.4,  升级后在安装数据库OUI时失败

InstallActionxxx log

INFO: SSH Support Manager logs will be written to /oracle/app/oraInventory/logs/sshsetup1_2022-10-17_08-48-39PM.log
INFO: Establishing SSH connectivity between the selected nodes. This may take several minutes. Please wait...
....
INFO: SSH Setup SharedUsername used: oracle
INFO: SSH Setup isSharedHome used: false
INFO: SSH Setup advanced used: true
WARNING: Failed to establish SSH connectivity between the selected nodes

sshsetup1 xxx log

INFO: LIBRARY_LOC = /tmp/OraInstall2022-10-17_08-48-39PM/oui/lib/linux64
INFO: m_PropertiesDir = /tmp/OraInstall2022-10-17_08-48-39PM/oui/prov/resources, r_PropertiesDir = null
INFO: SSHSetup: Creating remotePaths using PATH_PROPERTIES_LOC_PROPERTY
SEVERE: com.jcraft.jsch.JSchException: Algorithm negotiation fail
	at com.jcraft.jsch.Session.receive_kexinit(Session.java:583)
	at com.jcraft.jsch.Session.connect(Session.java:320)
	at com.jcraft.jsch.Session.connect(Session.java:183)
	at oracle.sysman.prov.ssh.RunCommand.getJschSession(RunCommand.java:1150)
	at oracle.sysman.prov.ssh.RunCommand.runCommand(RunCommand.java:273)
	at oracle.sysman.prov.ssh.BaseSSHSetup.runCommandHelper(BaseSSHSetup.java:515)
	at oracle.sysman.prov.ssh.BaseSSHSetup.findRemoteHome(BaseSSHSetup.java:687)
	at oracle.sysman.prov.ssh.BaseSSHSetup.findRemoteHomes(BaseSSHSetup.java:315)
	at oracle.sysman.prov.ssh.BaseSSHSetup.initialize(BaseSSHSetup.java:240)
	at oracle.sysman.prov.ssh.OpenSSHSetup.initialize(OpenSSHSetup.java:51)
	at oracle.sysman.prov.ssh.PlainOpenSSHSetup.initialize(PlainOpenSSHSetup.java:15)
	at oracle.sysman.prov.ssh.BaseSSHSetup.setUpSSH(BaseSSHSetup.java:121)
	at oracle.sysman.prov.ssh.SSHSetup.setupConnectivity(SSHSetup.java:443)
	at oracle.install.driver.oui.OUISSHSupportManager.establishSSHConnectivity(OUISSHSupportManager.java:193)
	at oracle.install.ivw.common.view.SSHSetupPane$8.perform(SSHSetupPane.java:362)
	at oracle.install.ivw.common.view.SSHSetupPane$8.run(SSHSetupPane.java:385)
....
INFO: An error occured which will cause the program to abort. Refer to latest Log file that was supplied while running the program. The Log file would created by name logfilename-
INFO: Execution of the command : echo $HOME failed on 'anbob2'
INFO: Lock Location : /home/oracle/.ssh/lock
INFO: Releasing Lock...

这种情况即使手动使用OS命令配置SSH互信,并且验证OS可以正常,同样在OUI中下一部在cp 文件阶段也会失败,日志如下

Cause
Indicated nodes were not reachable, or the user equivalence is not available for those nodes, or the user failed to access the temporary location on the indicated nodes.  Action
Ensure that all the indicated nodes are reachable, user equivalence exists for those nodes and current user has required permissions to access the temporary location on all the indicated nodes.  Additional Information:
Summary of the failed nodes hkbst-anbob2 
PRVG-1900 : The directory "/tmp/CVU_12.2.0.1.0_oracle/" cannot be used as work directory on nodes "hkbst-anbob2,cmlc-anbob4,cmlc-anbob3".
/usr/bin/scp: dest open "'/tmp/CVU_12.2.0.1.0_oracle//orarun.sh'": No such file or directory/usr/bin/scp: failed to upload file /tmp/CVU_12.2.0.1.0_oracle/orarun.sh to '/tmp/CVU_12.2.0.1.0_oracle//orarun.sh' :failed
/usr/bin/scp: dest open "'/tmp/CVU_12.2.0.1.0_oracle//orarun.sh'": No such file or directory/usr/bin/scp: failed to upload file /tmp/CVU_12.2.0.1.0_oracle/orarun.sh to '/tmp/CVU_12.2.0.1.0_oracle//orarun.sh' :failed
/usr/bin/scp: dest open "'/tmp/CVU_12.2.0.1.0_oracle//orarun.sh'": No such file or directory/usr/bin/scp: failed to upload file /tmp/CVU_12.2.0.1.0_oracle/orarun.sh to '/tmp/CVU_12.2.0.1.0_oracle//orarun.sh' :failed
Set the environment variable CV_DESTLOC to point to a different work area. 
Cause:? An operation requiring remote execution could not complete because
         the attempt to set up the Cluster Verification Utility remote
         execution framework failed because the necessary files could
         not be copied to the indicated directory on the indicated nodes.
         The accompanying message provides detailed failure information. 
Action:? Ensure that the path identified either exists or can be created on
         the indicated nodes. Ensure that user running this check has
         sufficient permission to overwrite the contents of the indicated
         directoy. Examine the accompanying error messages, address the
         issues reported and retry. 

当然可以使用cluvfy独立验证互信, 这里案例有个奇怪的是GI 安装正常,grid 用户验证用户互信正常,但oracle用户始终不通过, 此时按5的方法已不能解决。验证如下:

使用oracle的sshusersetup.sh增加互信同样报错。

$ ./sshUserSetup.sh -user oracle -hosts "hkbst-anbob1 hkbst-anbob2 cmlc-anbob3 cmlc-anbob4" -advanced -noPromptPassphrase

SSH setup is complete.

------------------------------------------------------------------------
Verifying SSH setup
===================
The script will now run the date command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.
The possible causes for failure could be:
1. The server settings in /etc/ssh/sshd_config file do not allow ssh
for user oracle.
2. The server may have disabled public key based authentication.
3. The client public key on the server may be outdated.
4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
5. User may not have passed -shared option for shared remote users or
may be passing the -shared option for non-shared remote users.
6. If there is output in addition to the date, but no password is asked,
it may be a security alert shown as part of company policy. Append the
additional text to the /sysman/prov/resources/ignoreMessages.txt file.
------------------------------------------------------------------------
--hkbst-anbob1:--
Running /usr/bin/ssh -x -l oracle hkbst-anbob1 date to verify SSH connectivity has been setup from local host to hkbst-anbob1.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
oracle@hkbst-anbob1's password: 
Mon Oct 17 21:35:15 CST 2022
------------------------------------------------------------------------
--hkbst-anbob2:--
Running /usr/bin/ssh -x -l oracle hkbst-anbob2 date to verify SSH connectivity has been setup from local host to hkbst-anbob2.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
oracle@hkbst-anbob2's password: 

...
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from hkbst-anbob1 to hkbst-anbob1
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
oracle@hkbst-anbob1's password: 
Permission denied, please try again.
Permission denied, please try again.
oracle@hkbst-anbob1: Permission denied (publickey,password,keyboard-interactive).

解决:
方法1, 降级openssh 版本到7.4

方法2, 增加所有密码算法到ssh_config

$ vi /etc/ssh/sshd_config
-- append
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-gr

$ systemctl restart sshd

7, Value not configured for CV_ASSUME_DISTID
[INS-13001] Environment does not meet minimum requirements With -ingnorePrereq option.
如安装的操作系统太新,如CentOS8

[DBCreationMode.flowWorker] [ 2022-10-03 12:43:27.956 CST ] [VerificationUtil.getUniqueDistributionID:8966] Value not configured for CV_ASSUME_DISTID SEVERE: Oct 03, 2022 12:43:27 PM oracle.install.commons.util.exception.AbstractErrorAdvisor getDetailedMessage SEVERE: [FATAL] java.lang.ExceptionInInitializerError SUMMARY: - java.lang.NullPointerException

解决
手动配置CV_ASSUME_DISTID
vi $ORACLE_HOME/cv/admin/cvu_config
–or —
export CV_ASSUME_DISTID=RHEL7.6

8,[INS-06006] Passwordless SSH connectivity not set up between the following node(s): []
使用gridset debug可以找到日志,OpenSSH 升级到 8.x。请注意,OpenSSH 的行为在任何其他平台/操作系统上可能有所不同,例如在 AIX 上,OpenSSH 7.5 存在此问题,而在 SLES Linux 12 SP4 上,OpenSSH_7.2p2 存在此问题。OpenSSH 8.0 增加了客户端检查服务器发送的文件名是否与命令行请求匹配,如果客户端和服务器通配符扩展存在差异,客户端可能会拒绝来自服务器的文件。出于这个原因,OpenSSH 8.0 为 scp 提供了一个新的“-T”标志,以禁用这些客户端检查。gridSetup.sh bug 30159782

# scp -p :"'/tmp/test.txt'" /tmp/test.txt
protocol error: filename does not match request

并且可以通过在命令中添加“-T”选项来避免该错误

# scp -T -p :"'/tmp/test.txt'" /tmp/test.txt
test.txt 100% 2 0.1KB/s 00:00

解决
安装 30159782 patch
— or

# Rename the original scp.
mv /usr/bin/scp /usr/bin/scp.orig

# Create a new file </usr/bin/scp>.
vi /usr/bin/scp

# Add the below line to the new created file </usr/bin/scp>.
/usr/bin/scp.orig -T $*

# Change the file permission.
chmod 555 /usr/bin/scp

After installation:
mv /usr/bin/scp.orig /usr/bin/scp

9. grid_setup.sh failing [INS-42505] The installer has detected that the Oracle Grid Infrastructure home software at ($GRID_HOME) is not complete.

On OUI, clicking on “Details” section shows the following extended error message

/u01/grid/product/12.2.0.1/grid_home/jdk/jre/lib/ppc64/compressedrefs/libj9vm28.so, /u01/grid/product/12.2.0.1/grid_home/jdk/jre/lib/ppc64/compressedrefs/libj9vmchk28.so, /u01/grid/product/12.2.0.1/grid_home/jdk/jre/lib/ppc64/compressedrefs/libj9vrb28.so, /u01/grid/product/12.2.0.1/grid_home/jdk/jre/lib/ppc64/compressedrefs/libj9zlib28.so,
Action - Ensure that the Oracle Grid Infrastructure home at ($GRID_HOME) includes the files listed above.

BUG 31579347

Workaround :

1. Either (a) proceed with the installation by clicking “Yes” or (b) click “No,
2. Then immediately rename /install/files.lst to/install/files.lst.bak and click “Next” again.

10. grid_setup.sh failing Error in invoking target ‘irman ioracle’ of makefile ‘/app/oracle/product/12.2.0.1/grid/rdbms/lib/ins_rdbms.mk’.
日志

/usr/bin/make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk ioracle
/usr/bin/ld:/app/oracle/product/12.2.0.1/grid/lib//libodm12.so: file format not recognized; treating as linker script
/usr/bin/ld:/app/oracle/product/12.2.0.1/grid/lib//libodm12.so:1: syntax error

Case 1) Unzip the Grid binary to a temporary location and copy to actual Grid home location
Case 2) Unzip using third party unzip utility

错误的文件
oracle@n1 tmp]$ ll /app/oracle/product/12.2.0.1/grid/lib/libodm12.so
-rwxrwxrwx 1 oracle oinstall 12 Mar 2 00:51 /app/oracle/product/12.2.0.1/grid/lib//libodm12.so

正常该文件应该是soft link

正确的文件
[grid@node1 lib]$ ll libodm12.so
lrwxrwxrwx 1 grid oinstall 12 Feb 19 08:15 libodm12.so -> libodmd12.so

解决
直接解决在目标路径下;使用oracle软件自带的unzip,而不是用操作系统自带的
如使用database/install/unzip 文件

更多INS错误

DEBUG方法

cluvfy  debug方法

export CV_TRACELOC=/tmp/cvutrace
export SRVM_TRACE=true
export SRVM_TRACE_LEVEL=1
cd /bin/
./cluvfy stage -post hacfg

gridSetup.sh debug方法

Run gridSetup.sh in debug mode:

$ gridSetup.sh -debug | tee /tmp/gridsetup.log
打赏

对不起,这篇文章暂时关闭评论。