Remote ‘AttachHome’ failed on nodes: ‘xxxxx’

系统:CentOS 7.9 64位
数据库:11.2.0.3 64位
环境:RAC(双节点)
问题描述:由于第一次安装rac失败,此后清空节点1 /u01/app/oraInventory目录下的全部文件后重新安装rac,进度到达76%报错“Remote 'AttachHome' failed on nodes: 'zhdljdb2'”,如下所示:

图中小窗口告警信息:
Remote 'AttachHome' failed on nodes: 'zhdljdb2'. Refer to '/u01/app/oraInventory/logs/installActions2022-09-27_01-13-27PM.log' for details.
It is recommended that the following command needs to be manually run on the failed nodes:
/u01/app/11.2.0/grid/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 CLUSTER_NODES=zhdljdb1,zhdljdb2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=<node on which command is to be run>.
Please refer 'AttachHome' logs under central inventory of remote nodes where failure occurred for more details.

告警日志:
[root@zhdljdb1 ~]# tail -500f /u01/app/oraInventory/logs/installActions2022-09-27_01-13-27PM.log
OUI-10197:Unable to create a new Oracle Home at /u01/app/11.2.0/grid. Oracle Home already exists at this location. Select another location.'AttachHome' failed. :failed
at oracle.ops.mgmt.cluster.ClusterCmd.runCmd(ClusterCmd.java:2126)
at oracle.sysman.oii.oiip.oiipg.OiipgClusterRunCmd.runCmdOnUnix(OiipgClusterRunCmd.java:270)
... 13 more

SEVERE: Remote 'AttachHome' failed on nodes: 'zhdljdb2'. Refer to '/u01/app/oraInventory/logs/installActions2022-09-27_01-13-27PM.log' for details.
It is recommended that the following command needs to be manually run on the failed nodes:
/u01/app/11.2.0/grid/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 CLUSTER_NODES=zhdljdb1,zhdljdb2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=<node on which command is to be run>.
Please refer 'AttachHome' logs under central inventory of remote nodes where failure occurred for more details.

解决过程:
按告警日志的建议,执行以下语句.
[grid@zhdljdb1 ~]$ /u01/app/11.2.0/grid/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 CLUSTER_NODES=zhdljdb1,zhdljdb2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=zhdljdb2
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB. Actual 4091 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
OUI-10197:Unable to create a new Oracle Home at /u01/app/11.2.0/grid. Oracle Home already exists at this location. Select another location.
'AttachHome' failed.
说明:执行该条语句失败.
此时查看节点2中的oraInventory目录内容,发现文件为第一次安装rac的时间.
[root@zhdljdb2 oraInventory]# ll
total 12
drwxrwx--- 2 grid oinstall 60 Sep 27 00:03 ContentsXML
drwxrwx--- 2 grid oinstall 4096 Sep 27 13:27 logs
-rw-rw---- 1 grid oinstall 56 Sep 27 00:03 oraInst.loc
-rwxrwx--- 1 grid oinstall 1620 Sep 27 00:03 orainstRoot.sh
查看节点1的oraInventory目录,发现该目录均为最新的文件时间.
[grid@zhdljdb1 oraInventory]$ ll
total 4
drwxrwx--- 2 grid oinstall 60 Sep 27 13:25 ContentsXML
drwxrwx--- 2 grid oinstall 4096 Sep 27 13:41 logs
drwxrwx--- 2 grid oinstall 22 Sep 27 13:23 oui
此后在节点2将原oraInventory重命令,然后重建该目录.
[grid@zhdljdb2 app]$ pwd
/u01/app
[grid@zhdljdb2 app]$ mv oraInventory oraInventory_old
[grid@zhdljdb2 app]$ mkdir oraInventory
修改后,重新执行之前的命令,无告警发生.
[grid@zhdljdb2 app]$ /u01/app/11.2.0/grid/oui/bin/runInstaller -attachHome -noClusterEnabled ORACLE_HOME=/u01/app/11.2.0/grid ORACLE_HOME_NAME=Ora11g_gridinfrahome1 CLUSTER_NODES=zhdljdb1,zhdljdb2 "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=zhdljdb2
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB. Actual 4095 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
Please execute the '/u01/app/oraInventory/orainstRoot.sh' script at the end of the session.
'AttachHome' was successful.