首页 > 其他分享 >opatch报补丁时,oui-patch.xml (Permission denied)报错

opatch报补丁时,oui-patch.xml (Permission denied)报错

时间:2023-09-12 12:11:16浏览次数:47  
标签:xml oui java app opatch 报错 oracle grid u01

前言

一套19.19 RAC环境,使用opatch工具安装数据库补丁,第一个节点成功安装,但在第二个节点执行opatch命令时报错。主要的错误有提示:/u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied),具体如下所示。

[grid@19crac2 35074478]$ $ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /software/35074478/35074478

Oracle Interim Patch Installer version 12.2.0.1.36

Copyright (c) 2023, Oracle Corporation.  All rights reserved.

 

 

Oracle Home       : /u01/app/19.0.0/grid

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/19.0.0/grid/oraInst.loc

OPatch version    : 12.2.0.1.36

OUI version       : 12.2.0.7.0

Log file location : /u01/app/19.0.0/grid/cfgtoollogs/opatch/opatch2023-09-08_15-43-51PM_1.log

 

Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   35074478 

 

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/19.0.0/grid')

 

 

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files...

Applying interim patch '35074478' to OH '/u01/app/19.0.0/grid'

 

Patching component oracle.rdbms.rsf, 19.0.0.0.0...

 

Patching component oracle.rdbms, 19.0.0.0.0...

ApplySession failed in system modification phase... 'ApplySession::apply failed: java.io.IOException: oracle.sysman.oui.patch.PatchException: java.io.FileNotFoundException: /u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)'

 

Restoring "/u01/app/19.0.0/grid" to the state prior to running NApply...

 

#### Stack trace of processes holding locks ####

 

Time: 2023-09-08_03-43-53PM

Command: oracle/opatch/OPatch apply -oh /u01/app/19.0.0/grid -local /software/35074478/35074478 -invPtrLoc /u01/app/19.0.0/grid/oraInst.loc

Lock File Name: /u01/app/oraInventory/locks/_u01_app_19.0.0_grid_writer.lock

StackTrace:

-----------

java.lang.Throwable

        at oracle.sysman.oii.oiit.OiitLockHeartbeat.writeStackTrace(OiitLockHeartbeat.java:193)

        at oracle.sysman.oii.oiit.OiitLockHeartbeat.<init>(OiitLockHeartbeat.java:173)

        at oracle.sysman.oii.oiit.OiitTargetLocker.getWriterLock(OiitTargetLocker.java:346)

        at oracle.sysman.oii.oiit.OiitTargetLocker.getWriterLock(OiitTargetLocker.java:238)

        at oracle.sysman.oii.oiic.OiicStandardInventorySession.acquireLocks(OiicStandardInventorySession.java:564)

        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initAreaControl(OiicStandardInventorySession.java:359)

        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:332)

        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:294)

        at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:243)

        at oracle.sysman.oui.patch.impl.HomeOperationsImpl.initialize(HomeOperationsImpl.java:107)

        at oracle.glcm.opatch.common.api.install.HomeOperationsShell.initialize(HomeOperationsShell.java:117)

        at oracle.opatch.ipm.IPMRWServices.addPatchCUP(IPMRWServices.java:134)

        at oracle.opatch.ipm.IPMRWServices.add(IPMRWServices.java:146)

        at oracle.opatch.ApplySession.apply(ApplySession.java:898)

        at oracle.opatch.ApplySession.processLocal(ApplySession.java:4109)

        at oracle.opatch.ApplySession.process(ApplySession.java:4979)

        at oracle.opatch.ApplySession.process(ApplySession.java:4841)

        at oracle.opatch.OPatchACL.processApply(OPatchACL.java:310)

        at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:1415)

        at oracle.opatch.opatchutil.NApply.legacy_process(NApply.java:373)

        at oracle.opatch.opatchutil.NApply.process(NApply.java:353)

        at oracle.opatch.opatchutil.OUSession.napply(OUSession.java:1138)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at oracle.opatch.UtilSession.process(UtilSession.java:355)

        at oracle.opatch.OPatchSession.process(OPatchSession.java:2643)

        at oracle.opatch.OPatch.process(OPatch.java:873)

        at oracle.opatch.OPatch.main(OPatch.java:930)

 

 ------------------------------------

 

OPatch failed to restore OH '/u01/app/19.0.0/grid'. Consult OPatch document to restore the home manually before proceeding.

 

NApply was not able to restore the home.  Please invoke the following scripts:

  - restore.[sh,bat]

  - make.txt (Unix only)

to restore the ORACLE_HOME.  They are located under

"/u01/app/19.0.0/grid/.patch_storage/NApply/2023-09-08_15-43-51PM"

 

UtilSession failed: ApplySession failed in system modification phase... 'ApplySession::apply failed: java.io.IOException: oracle.sysman.oui.patch.PatchException: java.io.FileNotFoundException: /u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)'

Log file location: /u01/app/19.0.0/grid/cfgtoollogs/opatch/opatch2023-09-08_15-43-51PM_1.log

 

OPatch failed with error code 73

[grid@19crac2 35074478]$

 

1、从错误日志可以看出,最主要的原因是/u01/app/oraInventory/ContentsXML/oui-patch.xml (Permission denied)。提示oui-patch.xml文件没有权限。

关于oui-patch.xml文件相关的故障案例很多,以前也遇到过几次,基本上都是因为安装补丁的节点上不存在该文件,或者该文件的权限异常,需要为660权限。

2、进入/u01/app/oraInventory/ContentsXML/目录,发现存在oui-patch.xml文件,权限也正常。

3、执行opatch lspatches命令,查看当前节点的补丁情况,计划回退刚刚安装的补丁。发现opatch相关的所有命令都报错。例如opatch lspatches命令输出如下所示。

[grid@19crac2 35074478]$ opatch lspatches

Inventory load failed... LsPatchesSession::loadAndPrintInstalledPatch()

LsPatchesSession failed: Unable to create patchObject

Possible causes are:

   ORACLE_HOME/inventory/oneoffs/35074478 is corrupted. PatchObject constructor: Input file "/u01/app/19.0.0/grid/inventory/oneoffs/35074478/etc/config/actions" or "/u01/app/19.0.0/grid/inventory/oneoffs/35074478/etc/config/inventory" does not exist.

 

 

OPatch failed with error code 2

[grid@19crac2 35074478]$

 

4、根据OPatch lsinventory or Apply New Patch With Opatch apply Fails With Error "Unable to create patchObject" Inventory Corrupted (Doc ID 2792549.1)文章的解决方案,将成功节点已经安装好的补丁复制至该节点,故障解决。

[grid@19crac1 35074478]$ cd $ORACLE_HOME/inventory/oneoffs/

[grid@19crac1 oneoffs]$ tar -cvf 35074478.tar 35074478

[grid@19crac1 oneoffs]$ scp 35074478.tar 19crac2:/u01/app/19.0.0/grid/inventory/oneoffs

[grid@19crac1 oneoffs]$ rm -rf *.tar

 

[grid@19crac1 35074478]$ cd $ORACLE_HOME/inventory/oneoffs/

[grid@19crac2 oneoffs]$ tar -xvf *.tar

[grid@19crac2 oneoffs]$ rm *.tar

 

[grid@19crac2 oneoffs]$ opatch lspatches

35074478;MERGE ON DATABASE RU 19.19.0.0.0 OF 34932268

35107512;TOMCAT RELEASE UPDATE 19.0.0.0.0 (35107512)

35050331;OCW RELEASE UPDATE 19.19.0.0.0 (35050331)

35050325;ACFS RELEASE UPDATE 19.19.0.0.0 (35050325)

35042068;Database Release Update : 19.19.0.0.230418 (35042068)

33575402;DBWLM RELEASE UPDATE 19.0.0.0.0 (33575402)

 

OPatch succeeded.

[grid@19crac2 oneoffs]$

可以看出,新安装的补丁也提示成功。

 

标签:xml,oui,java,app,opatch,报错,oracle,grid,u01
From: https://www.cnblogs.com/missyou-shiyh/p/17695838.html

相关文章

  • mysql8 - 1055报错
    在navicat上跑查询语句,不论执行什么都会报错[Err]1055-Expression#1ofORDERBYclauseisnotinGROUPBYclauseandcontainsnonaggregatedcolumn'information_schema.PROFILING.SEQ'whichisnotfunctionallydependentoncolumnsinGROUPBYclause......
  • XMLHttpRequest xhr请求
    1.属性①readyState:xhr的状态码。②status:http状态码。③statusText:http状态说明文本。④response:响应。(可通过xhr.response获取响应体数据)⑤responseType:响应类型。⑥responseURL:响应的URL路径。⑦responseText:响应的文本数据。⑧responseXML:响应的XML数据。......
  • 解决IDEA不编译java目录下的xml文件
    对于IDEA系列编辑器,XML文件是不能放在java文件夹中的,IDEA默认不会编译源码文件夹中的XML文件,可以参照以下方式解决:<build><resources><resource><!--xml放在java目录下--><directory>src/main/java</directory><includes>......
  • docker-compose 报错:ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+
    没有解决问题的操作wgethttps://www.openssl.org/source/openssl-1.1.1v.tar.gztar-zxvfopenssl-1.1.1v.tar.gzcdopenssl-*./config--prefix=/usr/local/ssl--openssldir=/usr/local/sslsharedmakesudomakeinstallecho"/usr/local/ssl/lib"|sudotee/e......
  • xxl-job-executor执行器部署到k8s中时,port报错
    错误:15:48:21.902logback[main]ERRORo.s.boot.SpringApplication-Applicationrunfailedorg.springframework.beans.factory.UnsatisfiedDependencyException:Errorcreatingbeanwithname'xxlJobConfig':Unsatisfieddependencyexpressedthroughfie......
  • JDBC 连接 MySQL 报错 Unknown system variable ‘query_cache_size‘
    官方说法:ThequerycacheisdeprecatedasofMySQL5.7.20,andisremovedinMySQL8.0.Deprecationincludesquery_cache_size.querycache在MySQL5.7.20已经过时了,并且在MySQL8.0版本中被移除了。所以要更新mysql驱动版本<dependency><groupId>mysql</groupId......
  • 【Kafka】ZooKeeper启动失败报错java.net.BindException_ Address already in use_ bi
    问题描述Kafka2.8.1ZooKeeper启动失败。zookeeper-server-start.bat../../config/zookeeper.properties[2023-09-0418:21:49,497]INFObindingtoport0.0.0.0/0.0.0.0:2181(org.apache.zookeeper.server.NIOServerCnxnFactory)[2023-09-0418:21:49,498]ERRORUnexpected......
  • 为什么EDI工作流中围绕XML做EDI报文数据解析/生成?
    经常有客户问起,为什么在处理EDI文件时不一次到位,而需要使用多个端口来分次进行处理呢,是不是想要多占用几个端口好多卖钱呀?实际上,在一开始的知行EDI产品中,功能还没有这么完善,当时只支持EDI常见的传输协议,那个时候我们在做报文翻译时,还不能仅通过简单的配置来实现,需要手写代码,去读......
  • 运行vue项目一直报错的问题的解决
    问题描述(上图为网图,自己的没来得及截图)问题解决第一个原因:vue版本过低;使用下面的语句进行版本升级:[email protected]但是我试了没啥用;第二个原因:node版本过低;使用下面的语句进行版本升级:--若是已经有更高级的版本,可以直接更换:nvmlistnvmuse版本--若是没有,就自己......
  • debezium报错:no longer available on the server. Reconfigure the connector to use
    debezium报错:nolongeravailableontheserver.Reconfiguretheconnectortouseasnapshotwhenneede完整报错如下:-“trace”:"io.debezium.DebeziumException:TheconnectoristryingtoreadbinlogstartingatSourceInfo[currentGtid=null,currentBinlogFilename......