重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 869|回复: 0
打印 上一主题 下一主题

opatchauto apply Results java.io.FileNotFoundException

[复制链接]
跳转到指定楼层
楼主
发表于 2022-3-17 14:52:19 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
opatchauto apply Results java.io.FileNotFoundException: <oraInventory>/ContentsXML/oui-patch.xml (Permission denied) Error in Non-OUI Nodes (Doc ID 2582139.1)       

In this Document
Symptoms
Changes
Cause
Solution
References

APPLIES TO:
Oracle Database - Enterprise Edition - Version 19.3.0.0.0 to 19.6.0.0.0 [Release 19]
Information in this document applies to any platform.
SYMPTOMS
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.


First node (OUI node):
$ ls -alrt <oraInventory>/ContentsXML
total 16
-rw-rw---- 1 grid oinstall 586 Aug 20 12:31 inventory.xml
-rw-rw---- 1 grid oinstall 174 Aug 20 15:16 oui-patch.xml
-rw-rw---- 1 grid oinstall 300 Aug 20 15:16 comps.xml
-rw-rw---- 1 grid oinstall 292 Aug 20 15:16 libs.xml
drwxrwx--- 2 grid oinstall 81 Aug 20 15:16 .
drwxrwx--- 5 grid oinstall 92 Aug 21 15:35 ..

Before applying any patch on node2 (Non-OUI node), oui-patch.xml doesn't exists


Second node:
$ ls -alrt <oraInventory>/ContentsXML
total 20
-rw-rw---- 1 grid oinstall 586 Aug 20 12:33 inventory.xml
-rw-rw---- 1 grid oinstall 292 Aug 20 15:37 libs.xml
-rw-rw---- 1 grid oinstall 300 Aug 20 15:37 comps.xml
drwxrwx--- 2 grid oinstall 107 Aug 20 15:49 .
drwxrwx--- 6 grid oinstall 105 Aug 21 15:35 ..

Executing opatchauto apply on node2 result following error:

#<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

Opatchauto log have following messages

<GRID_HOME>/cfgtoollogs/opatchauto/opatchauto<datetimestamp>.log:

Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : <NODE 2>-><GRID_HOME> Type[crs]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: <GRID_HOME>, host: <NODE 2>.
Command failed: <GRID_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/29833578/ -oh <GRID_HOME> -target_type
cluster -binary -invPtrLoc <GRID_HOME>/oraInst.loc -jre <GRID_HOME>/OPatch/jre -persistresult <GRID_HOME>/OPatch/auto/dbsessioninfo/sessionresult_<NODE2>_crs.ser -analyzedresult
<GRID_HOME>/OPatch/auto/dbsessioninfo/sessionresult_analyze_<NODE2>_crs.ser
Command failure output:
==Following patches FAILED in apply:

Patch: <UNZIPPED_PATCH_LOCATION>/29833578/29808885
Log: <GRID_HOME>/cfgtoollogs/opatchauto/core/opatch/opatch2019-05-31_02-21-47AM_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: $oraInventory/ContentsXML/oui-patch.xml (Permission denied)
After fixing the cause of failure Run opatchauto resume

]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.

OPatchauto session completed at Fri May 31 02:22:38 2019
Time taken to complete the session 9 minutes, 21 seconds

opatchauto failed with error code 42

After the above error, the file oui-patch.xml got generated under <oraInventory>/ContentsXML with database user (example: oracle) ownership (in Job role separation environment)


-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
-rw-rw---- 1 grid oinstall 292 May 31 02:21 libs.xml
-rw-rw---- 1 grid oinstall 300 May 31 02:21 comps.xml

However,on the OUI node (<NODE 1>), the file exists after fresh install, owned by GRID user with 660 permission.


-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

opatchauto on <NODE2> expects the file oui-patch.xml with the same permission on the OUI node, owned by Grid user, and mode should be 660.

Changing the permission of the file and executing "opatchauto resume" will result following error.

Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : <NODE 2>-><DB_HOME> Type[rac]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: <DB_HOME>, host: <NODE 2>.
Command failed: <DB_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/29708769 -oh <DB_HOME> -target_type rac_database -binary -invPtrLoc <DB_HOME>/oraInst.loc -jre <DB_HOME>/OPatch/jre -persistresult <DB_HOME>/OPatch/auto/dbsessioninfo/sessionresult_<NODE2>_rac.ser -analyzedresult <DB_HOME>/OPatch/auto/dbsessioninfo/sessionresult_analyze_<NODE2>_rac.ser
Command failure output:
==Following patches FAILED in apply:

Patch: <UNZIPPED_PATCH_LOCATION>/29708769/29834717
Log:
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException: Unable to create patchObject
Possible causes are:
ORACLE_HOME/inventory/oneoffs/29834717 is corrupted. java.lang.RuntimeException: No Patch exists,Please check.

After fixing the cause of failure Run opatchauto resume

]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.

CHANGES
Applying any patch using 'opatchauto' after the fresh installation of 19c GI.

CAUSE
The issue is analyzed and discussed in following internal / unpublished Bug

BUG 29859410 - OPATCHAUTO_194:OPATCHAUTO FAILED DUE TO WRONG PERMISSION OF OUI-PATCH.XML IN DIFFERENT USER ENV

Bug 30041091 : OPATCHAUTO_194:OPATCHAUTO FAILED DUE TO WRONG PERMISSION OF OUI-PATCH.XML IN DIFFERENT USER ENVIRONMENT

SOLUTION
OUI code bug 29859410 fixed in 20.1. At the time of writing this document, the defect on the opatch code is being investigated through BUG 30041091

Workaround is to have the OUI-PATCH.XML file copied in the central inventory of Non-OUI node from the OUI node with permission for GRID_HOME owner and re-run opatchauto apply on Non-OUI node.

REFERENCES

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-28 15:35 , Processed in 0.102253 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表