记一次OPatch failed with error code 73的处理过程

搞数据库运维的同学们打补丁这活儿想必是少不了的,那么你也肯定在OPath时遇到过各种各样的错误,今天就记录一次我遇到OPatch failed with error code 73的处理过程。

客户有一套4节点RAC,需要打patch 21539301解决Bug 5629423,让oracle在Impdp时可以同时创建多个索引,信息如下:

The creation of indexes in parallel has been addressed in Enhancement Request
Bug 5629423 - DATAPUMP DOES NOT CREATE THE INDEXES IN PARALLEL
This enhancement was implemented as a bug fix. Please download generic patch 21539301 (available for 12.1.0.2 and 11.2.0.4).

按部就班的去下载补丁、上传、解压、更新OPatch版本、冲突检测,一切OK。因为这是个one-off patch,且停机时间自由,所以采用在1节点$ORACLE_HOME/OPatch/opatch applay,给四个节点一起打,rac1很快成功完成,但当给远程节点应用时卡住了,一检查发现rac4被干掉了,整个系统都没了,导致了这个问题。

Rac system comprising of multiple nodes
  Local node = rac1
  Remote node = rac2
  Remote node = rac3
  Remote node = rac4

那么终止掉卡住的OPatch进程,去rac2,rac3上检查,补丁确实没打上。同时OPatch各种命令均报OPatch failed with error code 73

[oracle@rac3 21539301]$ $ORACLE_HOME/OPatch/opatch lsinventory 
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /home/app/oracle/product/11.2.0/db_1
Central Inventory : /home/app/oraInventory
   from           : /home/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.12
OUI version       : 11.2.0.4.0
Log file location : /home/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2016-05-10_23-58-36PM_1.log



Inventory load failed... OPatch cannot load inventory for the given Oracle Home.

LsInventorySession failed: Unable to create patchObject
Possible causes are:
   ORACLE_HOME/inventory/oneoffs/21539301 is corrupted. 
   No read permission to above directory
Please remove one-off entry [ 21539301 ] from /home/app/oracle/product/11.2.0/db_1/inventory/ContentsXML/comps.xml and retry if above directory corrupted, or Please check the contents of the directory ORACLE_HOME/inventory/oneoffs/21539301 for read permission

OPatch failed with error code 73

仔细看看报错,说的很明确,刚才半拉子场景导致了inventory的不一致,那么我们去修改comps.xml文件:

[oracle@rac3 21539301]$ cp /home/app/oracle/product/11.2.0/db_1/inventory/ContentsXML/comps.xml /home/app/oracle/product/11.2.0/db_1/inventory/ContentsXML/comps.xml.bak20160511 <----先备份再动手,养成好习惯
[oracle@rac3 21539301]$ vi /home/app/oracle/product/11.2.0/db_1/inventory/ContentsXML/comps.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<PRD_LIST>
<TL_LIST>
<COMP NAME="oracle.server" VER="11.2.0.4.0" BUILD_NUMBER="0" REP_VER="0.0.0.0.0" RELEASE="Production" INV_LOC="Components/oracle.server/11.2.0.4.0/1/" LANGS="en zh_CN" XML_INV_LOC="Components21/oracle.server/11.2.0.4.0/" ACT_INST_VER="11.2.0.4.0" DEINST_VER="11.2.0.0.0" INSTALL_TIME="2016.May.07 21:50:43 CST" INST_LOC="/home/app/oracle/product/11.2.0/db_1/oracle.server">
   <EXT_NAME>Oracle Database 11g</EXT_NAME>
   <DESC>Installs an optional preconfigured starter database, product options, management tools, networking services, utilities, and basic client software for an Oracle Database server. This option also supports Automatic Storage Management database configuration.</DESC>
   <DESCID>COMPONENT_DESC</DESCID>
   <STG_INFO OSP_VER="10.2.0.0.0"/>
   <CMP_JAR_INFO>
      <INFO NAME="filemapObj" VAL="Components/oracle/server/v11_2_0_4_0/filemap.xml"/>
      <INFO NAME="helpDir" VAL="Components/oracle/server/v11_2_0_4_0/help/"/>
      <INFO NAME="actionsClass" VAL="Components.oracle.server.v11_2_0_4_0.CompActions"/>
      <INFO NAME="resourceClass" VAL="Components.oracle.server.v11_2_0_4_0.resources.CompRes"/>
      <INFO NAME="identifiersXML" VAL="Components/oracle/server/v11_2_0_4_0/identifiers.xml"/>
      <INFO NAME="contextClass" VAL="Components.oracle.server.v11_2_0_4_0.CompContext"/>
      <INFO NAME="fastCopyLogXML" VAL="Components/oracle/server/v11_2_0_4_0/fastCopyLog.xml"/>
   </CMP_JAR_INFO>
   <LOC_INFO INST_DFN_LOC="../Scripts" JAR_NAME="install1.jar"/>
   <BOOK NAME="oracle.server.hs"/>
   <PRE_REQ DEF="F"/>
   <PROD_HOME DEF="F"/>
   <LANG_IDX_MAP>
      <LANG LIST="en fr ar bn pt_BR bg fr_CA ca hr cs da nl ar_EG en_GB et fi de el iw hu is in it ja ko es lv lt ms es_MX no pl pt ro ru zh_CN sk sl es_ES sv th zh_TW tr uk vi"/>
      <LANGSET IDX="1" BITSET="{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44}"/>
      <LANGSET IDX="2" BITSET="{2}"/>
      <LANGSET IDX="3" BITSET="{9}"/>
      <LANGSET IDX="4" BITSET="{16}"/>
      <LANGSET IDX="5" BITSET="{10}"/>
      <LANGSET IDX="6" BITSET="{25, 29, 38}"/>
      <LANGSET IDX="7" BITSET="{17}"/>
      <LANGSET IDX="8" BITSET="{1}"/>
      <LANGSET IDX="9" BITSET="{19}"/>
      <LANGSET IDX="10" BITSET="{22}"/>
      <LANGSET IDX="11" BITSET="{18}"/>
      <LANGSET IDX="12" BITSET="{23}"/>
      <LANGSET IDX="13" BITSET="{24}"/>
      <LANGSET IDX="14" BITSET="{30}"/>
      <LANGSET IDX="15" BITSET="{11}"/>
      <LANGSET IDX="16" BITSET="{31}"/>
"/home/app/oracle/product/11.2.0/db_1/inventory/ContentsXML/comps.xml" 7338L, 411919C                                                     1,1           Top
<ONEOFF REF_ID="21539301" UNIQ_ID="19476720" ROLLBACK="T" XML_INV_LOC="oneoffs/21539301/" ACT_INST_VER="11.2.0.4.0" INSTALL_TIME="2016.May.10 23:55:17 CST">
   <DESC></DESC>
   <REF_LIST>
      <REF NAME="oracle.rdbms.dbscripts" VER="11.2.0.4.0" HOME_IDX="2"/>
   </REF_LIST>
   <BUG_LIST>
      <BUG>21539301</BUG>
   </BUG_LIST>
   <FILE_LIST/>
</ONEOFF>
            <DEP NAME="oracle.rdbms.numa" VER="10.1.0.1.0" PLAT="ALL_PLATFORMS"/>
            <DEP NAME="oracle.oraolap" VER="11.2.0.4.0" PLAT="Linux"/>
            <DEP NAME="oracle.ntmgmtobjs" VER="11.2.0.4.0" PLAT="ALL_PLATFORMS"/>
            <DEP NAME="oracle.rdbms.dm" VER="11.2.0.4.0" PLAT="Linux"/>
            <DEP NAME="oracle.clrintg.ode_net_2" VER="11.2.0.4.0" PLAT="ALL_PLATFORMS"/>
            <DEP NAME="oracle.rdbms.dv" VER="11.2.0.4.0" PLAT="Linux"/>
            <DEP NAME="oracle.rdbms.rat" VER="11.2.0.4.0" PLAT="Linux"/>
         </DEP_LIST>
      </DEP_GRP>
   </DEP_GRP_LIST>
   <DEP_LIST>
      <DEP NAME="oracle.network.aso" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
      <DEP NAME="oracle.rdbms.partitioning" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
      <DEP NAME="oracle.sdo" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
      <DEP NAME="oracle.rdbms.lbac" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
      <DEP NAME="oracle.oraolap" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
      <DEP NAME="oracle.rdbms.dm" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
      <DEP NAME="oracle.rdbms.dv" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
      <DEP NAME="oracle.rdbms.rat" VER="11.2.0.4.0" DEP_GRP_NAME="Optional" HOME_IDX="2"/>
   </DEP_LIST>
   <REF_LIST>
      <REF NAME="oracle.server" VER="11.2.0.4.0" HOME_IDX="2"/>
   </REF_LIST>
   <INST_TYPE_LIST>
      <INST_TYPE NAME="Typical" NAME_ID="Typical" DESC_ID="Typical_DESC"/>
   </INST_TYPE_LIST>
   <FILESIZEINFO>
      <DEST VOLUME="%INVENTORY_LOCATION%" SPACE_REQ="2000"/>
      <DEST VOLUME="%ORACLE_HOME%" SPACE_REQ="4107"/>
   </FILESIZEINFO>
</COMP>
</COMP_LIST>
<ONEOFF_LIST>     <-----删除这个结构里的one-off entry [ 21539301 ]相关信息
</ONEOFF_LIST>
<PATCHSET_UPDATE_LIST>
</PATCHSET_UPDATE_LIST>
</PRD_LIST>
~
~
~
~
~
~
~
~
~
~
"/home/app/oracle/product/11.2.0/db_1/inventory/ContentsXML/comps.xml" 7328L, 411562C written

修改完成后,继续以本地模式opatch,顺利完成。另外一个节点也如此操作。

[oracle@rac3 21539301]$ $ORACLE_HOME/OPatch/opatch apply -local
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /home/app/oracle/product/11.2.0/db_1
Central Inventory : /home/app/oraInventory
   from           : /home/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.12
OUI version       : 11.2.0.4.0
Log file location : /home/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/21539301_May_11_2016_00_12_19/apply2016-05-11_00-12-19AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   21539301  

Do you want to proceed? [y|n]
y     
User Responded with: Y
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: 

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  Y


Backing up files...
Applying interim patch '21539301' to OH '/home/app/oracle/product/11.2.0/db_1'

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patch 21539301 successfully applied.
Log file location: /home/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/21539301_May_11_2016_00_12_19/apply2016-05-11_00-12-19AM_1.log

OPatch succeeded.

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注