Oracle11g安装GI PSU时失败一案例的解决方法

来源:互联网 发布:史陶比尔软件 编辑:程序博客网 时间:2024/05/02 01:13


ON : Oracle 11.2.0.4.0,RAC,Linux x86-64


用户在安装最新发布的11.2.0.4.6 这个GI PSU时,报如下错误:

[root@crmdadbs1 psu]# /oracle/app/oracle/product/11.2.0/crmdadbs/OPatch/opatch auto /home/psu/20485808 -oh /oracle/app/oracle/product/11.2.0/crmdadbs -ocmrf /home/psu/ocm.rspExecuting /oracle/app/11.2.0/grid/perl/bin/perl /oracle/app/oracle/product/11.2.0/crmdadbs/OPatch/crs/patch11203.pl -patchdir /home/psu -patchn 20485808 -oh /oracle/app/oracle/product/11.2.0/crmdadbs -ocmrf /home/psu/ocm.rsp -paramfile /oracle/app/11.2.0/grid/crs/install/crsconfig_paramsThis is the main log file: /oracle/app/oracle/product/11.2.0/crmdadbs/cfgtoollogs/opatchauto2015-04-21_17-32-58.logThis file will show your detected configuration and all the steps that opatchauto attempted to do on your system:/oracle/app/oracle/product/11.2.0/crmdadbs/cfgtoollogs/opatchauto2015-04-21_17-32-58.report.log2015-04-21 17:32:58: Starting Clusterware Patch SetupUsing configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_paramsStopping RAC /oracle/app/oracle/product/11.2.0/crmdadbs ...Stopped RAC /oracle/app/oracle/product/11.2.0/crmdadbs successfullypatch /home/psu/20485808/20299013  apply failed  for home  /oracle/app/oracle/product/11.2.0/crmdadbs >>>>>>>>安装补丁20299013 失败Starting RAC /oracle/app/oracle/product/11.2.0/crmdadbs ...Started RAC /oracle/app/oracle/product/11.2.0/crmdadbs successfullyopatch auto succeeded.

查看日志/oracle/app/oracle/product/11.2.0/crmdadbs/cfgtoollogs/opatchauto2015-04-21_17-32-58.log,发现如下内容:

2015-04-21 17:33:41: s_run_as_user2: Running /bin/su oracle -c ' /oracle/app/oracle/product/11.2.0/crmdadbs/OPatch/opatch napply /home/psu/20485808/20299013 -local -silent -ocmrf /home/psu/ocm.rsp -oh /oracle/app/oracle/product/11.2.0/crmdadbs -invPtrLoc /oracle/app/oracle/product/11.2.0/crmdadbs/oraInst.loc '2015-04-21 18:33:09: Removing file /tmp/fileWSJEuf2015-04-21 18:33:09: Successfully removed file: /tmp/fileWSJEuf2015-04-21 18:33:09: /bin/su exited with rc=732015-04-21 18:33:09: status of apply patch is 186882015-04-21 18:33:09: The apply patch output is Oracle Interim Patch Installer version 11.2.0.3.6 Copyright (c) 2013, Oracle Corporation.  All rights reserved. Oracle Home       : /oracle/app/oracle/product/11.2.0/crmdadbs Central Inventory : /oracle/app/oraInventory    from           : /oracle/app/oracle/product/11.2.0/crmdadbs/oraInst.loc OPatch version    : 11.2.0.3.6 OUI version       : 11.2.0.4.0 Log file location : /oracle/app/oracle/product/11.2.0/crmdadbs/cfgtoollogs/opatch/opatch2015-04-21_17-33-41PM_1.log Unable to lock Central Inventory.  OPatch will attempt to re-lock. >>>>>>>往下类似信息均表示Central Inventory目录可能存在权限问题,Opatch无法操作 Do you want to proceed? [y|n] Y (auto-answered by -silent) User Responded with: Y OPatch will sleep for few seconds, before re-trying to get the lock... Unable to lock Central Inventory.  OPatch will attempt to re-lock. Do you want to proceed? [y|n] Y (auto-answered by -silent) User Responded with: Y OPatch will sleep for few seconds, before re-trying to get the lock... Unable to lock Central Inventory.  OPatch will attempt to re-lock. Do you want to proceed? [y|n] Y (auto-answered by -silent) User Responded with: Y OPatch will sleep for few seconds, before re-trying to get the lock...  ........................  Unable to lock Central Inventory.  OPatch will attempt to re-lock. Do you want to proceed? [y|n] Y (auto-answered by -silent) User Responded with: Y OPatch will sleep for few seconds, before re-trying to get the lock... OUI-10022:The target area /oracle/app/oraInventory cannot be used because it is in an invalid state. OPatchSession cannot load inventory for the given Oracle Home /oracle/app/oracle/product/11.2.0/crmdadbs. Possible causes are:    No read or write permission to ORACLE_HOME/.patch_storage    Central Inventory is locked by another OUI instance    No read permission to Central Inventory    The lock file exists in ORACLE_HOME/.patch_storage    The Oracle Home does not exist in Central Inventory UtilSession failed: OUI-10022:The target area /oracle/app/oraInventory cannot be used because it is in an invalid state. Log file location: /oracle/app/oracle/product/11.2.0/crmdadbs/cfgtoollogs/opatch/opatch2015-04-21_17-33-41PM_1.log OPatch failed with error code 732015-04-21 18:33:09: patch /home/psu/20485808/20299013  apply failed  for home  /oracle/app/oracle/product/11.2.0/crmdadbs2015-04-21 18:33:09: Running as user oracle: true2015-04-21 18:33:09: s_run_as_user2: Running /bin/su oracle -c ' true '2015-04-21 18:33:09: Removing file /tmp/filec2SqSB2015-04-21 18:33:09: Successfully removed file: /tmp/filec2SqSB2015-04-21 18:33:09: /bin/su successfully executed

于是,我对照了下其他运行正常的环境中,oraInventory目录的权限是什么样子,对比后发现,果然存在不一致的地方,正常情况下oraInventory的权限应为:drwxrwx---,而当前环境中的此目录的权限为drwxr-xr-x。

修改目录权限:

首先对该目录进行备份:

tar -cpvf oraInventory.tar oraInventory


[root@crmdadbs2 app]# chmod 770 oraInventory


再次执行opatch:

[root@crmdadbs1 psu]# /oracle/app/oracle/product/11.2.0/crmdadbs/OPatch/opatch auto /home/psu/20485808 -oh /oracle/app/oracle/product/11.2.0/crmdadbs -ocmrf /home/psu/ocm.rspExecuting /oracle/app/11.2.0/grid/perl/bin/perl /oracle/app/oracle/product/11.2.0/crmdadbs/OPatch/crs/patch11203.pl -patchdir /home/psu -patchn 20485808 -oh /oracle/app/oracle/product/11.2.0/crmdadbs -ocmrf /home/psu/ocm.rsp -paramfile /oracle/app/11.2.0/grid/crs/install/crsconfig_paramsThis is the main log file: /oracle/app/oracle/product/11.2.0/crmdadbs/cfgtoollogs/opatchauto2015-04-21_20-39-00.logThis file will show your detected configuration and all the steps that opatchauto attempted to do on your system:/oracle/app/oracle/product/11.2.0/crmdadbs/cfgtoollogs/opatchauto2015-04-21_20-39-00.report.log2015-04-21 20:39:00: Starting Clusterware Patch SetupUsing configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_paramsStopping RAC /oracle/app/oracle/product/11.2.0/crmdadbs ...Stopped RAC /oracle/app/oracle/product/11.2.0/crmdadbs successfullypatch /home/psu/20485808/20299013  apply successful for home  /oracle/app/oracle/product/11.2.0/crmdadbs patch /home/psu/20485808/20420937/custom/server/20420937  apply successful for home  /oracle/app/oracle/product/11.2.0/crmdadbs Starting RAC /oracle/app/oracle/product/11.2.0/crmdadbs ...Started RAC /oracle/app/oracle/product/11.2.0/crmdadbs successfullyopatch auto succeeded.

OK.


后了解到,是因用户曾误操作对整个  /oracle  目录做过权限修改,chmod -R 755 /oracle,而该目录是GRID和DBMS软件可执行文件所在目录。(我担心的是以后还会不会存在其他问题可能会发生)。

0 0
原创粉丝点击