暂无图片
暂无图片
1
暂无图片
暂无图片
1
暂无图片

Oracle-第二节点打补丁报错 oui-patch.xml

原创 lizhao01 2022-05-18
1372

##GRID
第二节点打补丁报错 oui-patch.xml (Permission denied)

#<GRID\_HOME>/OPatch/opatchauto apply <unzipped location of patch>  
OPatchauto session is initiated at Tue May 31 02:21:42 2019

System initialization log file is <GRID\_HOME>/cfgtoollogs/opatchautodb/systemconfig2019-05-31\_02-21-44AM.log.

Session log file is <GRID\_HOME>/cfgtoollogs/opatchauto/opatchauto2019-05-31\_02-21-44AM.log  

复制

.
.
.

Patch: <unzipped location of patch>  
Log: <GRID\_HOME>/cfgtoollogs/opatchauto/core/opatch/opatch2019-05-31\_02-22-44AM\_1.log  
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: ApplySession failed in system modification phase... 'ApplySession::apply failed: java.io.IOException: oracle.sysman.oui.patch.PatchException: java.io.FileNotFoundException: <Inventory\_location>/ContentsXML/oui-patch.xml (Permission denied)'

复制

After fixing the cause of failure Run opatchauto resume

##发现权限不对,是RAC的一个bug,官方说是 由于二节点未使用oui进程安装的,所以未生成这个文件

During 19.x Grid Infrastructure (GI) installation, the file ‘oui-patch.xml’ will be created under the central inventory directory on the OUI node (node where gridSetup.sh was invoked) but not on the remote nodes.

-bash-4.4# hostname;date;ls -ltr $oraInventory/ContentsXML/  
<NODE 1>  
Fri May 31 02:31:36 PDT 2019  
total 16  
-rw-rw---- 1 grid oinstall 570 May 31 00:40 inventory.xml  
-rw-rw---- 1 grid oinstall 174 May 31 00:40 oui-patch.xml ---> Owned by grid 正常节点  
-rw-rw---- 1 grid oinstall 292 May 31 00:43 libs.xml


复制
-bash-4.4# hostname;date;ls -ltr $oraInventory/ContentsXML/  
<NODE 2>  
Fri May 31 02:30:46 PDT 2019  
total 20  
-rw-rw---- 1 grid oinstall 570 May 31 00:43 inventory.xml  
-rw-r--r-- 1 oracle oinstall 174 May 31 02:21 oui-patch.xml \---> Owned by oracle -->这里应该是opatchauto执行时,先安装DB HOME的补丁导致使用Oracle用户生成了oui-patch.xml文件需要修改权限,或者从1节点拷贝  
-rw-rw---- 1 grid oinstall 292 May 31 02:21 libs.xml  
-rw-rw---- 1 grid oinstall 300 May 31 02:21 comps.xml

复制

##官方给的解决方案是从1节点copy oui-patch.xml 文件过来,然后重新使用opatchauto resume开始安装补丁

在我这里并不好使。

紧接着有如下的问题:

##然后系统报错

[grid@rac02 ~\]$ $ORACLE\_HOME/OPatch/opatch lspatches  
Inventory load failed... LsPatchesSession::loadAndPrintInstalledPatch()  
LsPatchesSession failed: Unable to create patchObject  
Possible causes are:  
ORACLE\_HOME/inventory/oneoffs/32545013 is corrupted. PatchObject constructor: Input file "/u01/app/19.3.0.0/grid/inventory/oneoffs/32545013/etc/config/actions" or "/u01/app/19.3.0.0/grid/inventory/oneoffs/32545013/etc/config/inventory" does not exist.

复制

OPatch failed with error code 2

找32545013补丁找不到。

##我的解决方案

1.从好的节点拷贝这个补丁文件到问题节点

[grid@rac01 ~\]$ cd /u01/app/19.3.0.0/grid/inventory/oneoffs/  
[grid@rac01 oneoffs\]$ ls -l  
total 0  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29401763  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29517242  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29517247  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29585399  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:49 32545013  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:50 32576499  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:52 32579761  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:52 32584670  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:53 32585572  
[grid@rac01 oneoffs\]$ tar -cvf 32545013.tar 32545013  
32545013/  
32545013/etc/  
32545013/etc/config/  
32545013/etc/config/inventory.xml  
32545013/etc/config/actions.xml  
32545013/jlib/  
[grid@rac01 oneoffs\]$ scp 32545013.tar rac02:$PWD  
32545013.tar

复制
[grid@rac01 ~\]$ cd /u01/app/19.3.0.0/grid/inventory/oneoffs/  
[grid@rac01 oneoffs\]$ ls -l  
total 0  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29401763  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29517242  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29517247  
drwxr-x--- 4 grid oinstall 29 Apr 18 2019 29585399  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:49 32545013  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:50 32576499  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:52 32579761  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:52 32584670  
drwxr-xr-x 4 grid oinstall 29 Jul 3 09:53 32585572  
[grid@rac01 oneoffs\]$ tar -cvf 32545013.tar 32545013  
32545013/  
32545013/etc/  
32545013/etc/config/  
32545013/etc/config/inventory.xml  
32545013/etc/config/actions.xml  
32545013/jlib/  
[grid@rac01 oneoffs\]$ scp 32545013.tar rac02:$PWD  
32545013.tar

复制

2.再次执行发现可以 使用opatch命令查询出来

[grid@rac02 oneoffs]$ $ORACLE_HOME/OPatch/opatch lspatches
32545013;Database Release Update : 19.11.0.0.210420 (32545013)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517247;ACFS RELEASE UPDATE 19.3.0.0.0 (29517247)
29401763;TOMCAT RELEASE UPDATE 19.0.0.0.0 (29401763)

3.此时可以 使用opatchauto回滚补丁

[root@rac02 oracle\]# opatchauto rollback /soft/oracle/32545008 -oh /u01/app/19.3.0.0/grid

OPatchauto session is initiated at Sat Jul 3 12:09:00 2021

System initialization log file is /u01/app/19.3.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2021-07-03\_12-09-05PM.log.

浼..?ュ??.欢?.u01/app/19.3.0.0/grid/cfgtoollogs/opatchauto/opatchauto2021-07-03\_12-09-11PM.log  
姝や?璇.. ID 涓?NK5U

Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.3.0.0/grid  
Patch applicability verified successfully on home /u01/app/19.3.0.0/grid

  
Executing patch validation checks on home /u01/app/19.3.0.0/grid  
Patch validation checks successfully completed on home /u01/app/19.3.0.0/grid

Checking shared status of home.....

Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.3.0.0/grid

Prepatch operation log file location: /u01/app/grid/crsdata/rac02/crsconfig/crs\_prepatch\_rac02\_2021-07-03\_12-10-23AM.log  
CRS service brought down successfully on home /u01/app/19.3.0.0/grid

  
Start rolling back binary patch on home /u01/app/19.3.0.0/grid

复制

4.回滚完再次 opatchauto 仅给grid应用补丁 解决该问题。因为我发现db已经成功安装补丁了,如果不放心可以将二节点全部回滚,再次重新安装补丁。

总结一下:该故障做了2件事情

  • 1.修改 $oraInventory/ContentsXML/oui-patch.xml 文件权限为 grid:oinstall rw-rw-r

  • 2.拷贝 1节点的补丁包到2节点对应目录  /u01/app/19.3.0.0/grid/inventory/oneoffs/

  • 3.回滚2节点已经安装的补丁

  • 4.重新安装补丁。

作为标准安装,我根更建议在node2安装完以后,立即使用grid用户scp节点一的文件 $oraInventory/ContentsXML/oui-patch.xml,到节点二的目录,权限赋予grid:oinstall rw-rw-r。

最后修改时间:2022-05-21 20:54:03
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

墨天轮福利君
暂无图片
2年前
评论
暂无图片 0
您好,您的文章已入选墨力原创作者计划合格奖,10墨值奖励已经到账请查收! ❤️我们还会实时派发您的流量收益。
2年前
暂无图片 点赞
评论