打补丁报错Opatch error : "Unable to lock Central Inventory
来源:互联网 发布:淘宝卖家寄恐怖东西 编辑:程序博客网 时间:2024/05/02 12:19
Applies to:
Oracle Database - Enterprise Edition - Version 9.2.0.1 to 10.2.0.4 [Release 9.2 to 10.2]
Information in this document applies to any platform.
This problem can occur on any UNIX platform
***Checked for relevance on 29-Mar-2013***
Symptoms
Opatch apply failing with following errors
Unable to lock Central Inventory. OPatch will attempt to re-lock.
Do you want to proceed? [y|n]
Following are the messages during 'opatch apply'
[oracle@ccuine19 5596276]$ id
uid=500(oracle) gid=500(oinstall) groups=100(users),500(oinstall)
[oracle@ccuine19 5596276]$ opatch apply
Invoking OPatch 10.2.0.4.7
Oracle Interim Patch Installer version 10.2.0.4.7
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Oracle Home : /db/dr/drdb/10.2.0
Central Inventory : /etc/oraInventory
from : /etc/oraInst.loc
OPatch version : 10.2.0.4.7
OUI version : 10.2.0.4.0
OUI location : /db/dr/drdb/10.2.0/oui
Log file location : /db/dr/drdb/10.2.0/cfgtoollogs/opatch/opatch2009-07-22_10-
50-24AM.log
Patch history file: /db/dr/drdb/10.2.0/cfgtoollogs/opatch/opatch_history.txt
ApplySession applying interim patch '5596276' to OH '/db/dr/drdb/10.2.0'
Unable to lock Central Inventory. OPatch will attempt to re-lock.
Do you want to proceed? [y|n]
y
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]
Cause
Cause 1: Main cause for this issue is permissions problem.
Oracle user does not have WRITE permissions on "<oraInventory>/locks" in order to create writer.lock for locking the central inventory. Below is the cause justification
OS user being used to apply the patch is "oracle" and permissions on 'oraInventory' contents are
[oracle@ccuine19 oraInventory]$ id
uid=500(oracle) gid=500(oinstall) groups=100(users),500(oinstall)
[oracle@ccuine19 oraInventory]$ ls -la
total 40
drwxrwxrwx 6 oracle oinstall 4096 Jul 20 14:27 .
drwxr-xr-x 116 root root 12288 Jul 21 15:42 ..
drwxrwxrwx 2 oracle oinstall 4096 Jul 8 18:28 Contents
drwxrwxrwx 2 oracle oinstall 4096 Jul 14 12:00 ContentsXML
-rwxrwxrwx 1 oracle oinstall 37 Jul 21 14:27 install.platform
drwxr-xr-x 2 testdb oinstall 4096 Jul 21 14:28 locks
drwxrwx--- 2 oracle oinstall 4096 Jul 22 12:20 logs
There are two oracle users "oracle" and "testdb" sharing the same central inventory (i.e oraInventory). But some how write permissions on "locks" folder is set to "testdb" only. Which is causing "oracle" user unable to create writer.lock file inside "locks" folder and thus the error "Unable to lock Central Inventory".
Cause 2:
Another possible cause for this issue is previous failed/unsuccessful patching activity which leaves write.lock (in oraInventory>/locks/) and/or patch_locked (in $ORACLE_HOME/.patch_storage/)
NOTE:257800.1 OPATCH: Interim Patch is holding the lock from this patch
NOTE:73123.1 Universal Installer / OPatch tools are Hanging and / or Fail to Install
Verified and found that this issue is not due to previous failed/unsuccessful patching activity because files patch_locked and/or writer.locked do not exist in given locations.
[oracle@ccuine19 5596276]$ cat /etc/oraInst.loc
inventory_loc=/etc/oraInventory
inst_group=oinstall
[oracle@ccuine19 5596276]$ ls /etc/oraInventory/locks
[oracle@ccuine19 5596276]$ ls $ORACLE_HOME/.patch_storage
5596276_Apr_22_2008_05_54_46/
Solution
To implement the solution, please execute the following steps:
1. Verify and ensure that oracle user, who is running the opatch/runInstaller command, has WRITE permissions on central inventory (i.e "oraInventory") and its contents
$ ls -la <oraInventory>
2. If same central inventory (i.e oraInventory) is used for multiple Oracle Home installations using different OS user accounts (Example: 'oracle:oinstall' and 'testdb:oinstall'), then ensure that central inventory (i.e oraInventory) has GROUP (i.e oinstall) WRITE permissions so that any user account (oracle:oinstall OR testdb:oinstall) fall under same GROUP (i.e oinstall) can have proper permissions (read/write) to access/update the central inventory.
3. If problem persists even after having proper WRITE permissions for oracle user, then problem is due to presence of following files (mentioned underCause 2)
<oraInventory>/locks/writer.lock
and/or
$ORACLE_HOME/.patch_storage/patch_locked
Verify and ensure that these two files are not present in menitoned locations.
Following is the solution for the issue due to permissions problem
- Grant group WRITE permissions on oraInventory folder and its contents
# cat /etc/oraInst.loc
inventory_loc=/etc/oraInventory
inst_group=oinstall
# chmod -R g+w /etc/oraInventory
- Re-try applying the patch
- 打补丁报错Opatch error : "Unable to lock Central Inventory
- windows平台打补丁,报错OPatch failed with error code = 74
- OPatch cannot find a valid oraInst.loc file to locate Central Inventory
- opatch apply 报错 OPatch failed with error code 73
- opatch报错OPatch failed with error code 2
- Opatch打补丁
- InnoDB: Unable to lock ibdata1, error: 35
- mysql Unable to lock ./ibdata1, error: 11
- eclipse报错,显示 Unable to update index for central|http://repo1.maven.org/maven2
- OPatch failed with error code 104报错
- OPatch 报错:OPatch needs to modify files which are being used by some processes.
- [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
- mysql之 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
- Fatal error: Unable to read 1403 bytes in 报错
- Oracle 更新Opatch、打补丁
- Oracle11g opatch打补丁
- Oracle软件打补丁Opatch
- Oracle 更新Opatch、打补丁
- hdu 2571 命运(动态规划)
- cocos2d-x Android游戏黑屏解决办法
- ubuntu 搭建eclipse开发环境并真机调试
- N!
- hdu3530——Subsequence(单调队列优化DP)
- 打补丁报错Opatch error : "Unable to lock Central Inventory
- 获取免费域名——用“花生壳”绑定IP
- 关于撰写简历及面试注意事项
- CentOS 5.5上安装配置oracle 11g R2
- google地图上固定的点添加marker标记
- 根据Json串生成Html(一)
- tomcat 发布应用
- DS18B20温度传感器测温显示在数码管上(29.9℃)
- java操作excel