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

 找回密码
 注册

QQ登录

只需一步,快速开始

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

卸载OJVM 报错Unable to Lock Central Inventory. OPatch will Attempt to Re-lock

[复制链接]
跳转到指定楼层
楼主
发表于 2021-11-26 17:49:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 2021-11-26 17:51 编辑

在ORACLE 19c rac中打了gi补丁后,单独拆卸数据库的OJVM报错:Unable to Lock Central Inventory. OPatch will Attempt to Re-lock

[oracle@db1 ~]$ $ORACLE_HOME/OPatch/opatch rollback -id 33192694
Unable to Lock Central Inventory. OPatch will Attempt to Re-lock

。。。


一直提示是否重试?

可以看看 <ActualInventoryLocationDir> /locks,比如 /u01/app/oraInventory/locks,看看组的权限,是否有写的权限,如果没有,加上写的权限:chmod g+w /u01/app/oraInventory/locks
再看看 /u01/app/oraInventory/locks 下面是否有 write.lock 文件,如果有,改名或者删除。
之后,即可。


附:

Opatch lsinventory Fails With INFO:Unable to Lock Central Inventory. OPatch will Attempt to Re-lock. (Doc ID 2645402.1)        

In this Document
Symptoms
Changes
Cause
Solution
References

APPLIES TO:
Oracle Tuxedo - Version 12.2.2 and later
Information in this document applies to any platform.
SYMPTOMS
opatch lsinventory fails with LsInventorySession failed: Unable to lock Central Inventory. Stop trying per user-request?


<ORACLE_HOME>/OPatch/opatch lsinventory
Invoking OPatch 11.2.0.1.2

Oracle Interim Patch Installer version 11.2.0.1.2
Copyright (c) 2010, Oracle Corporation. All rights reserved.


Oracle Home : <ORACLE_HOME>
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.2
OUI version : 12.2.0.1.0
OUI location : <ORACLE_HOME>/oui
Log file location : <ORACLE_HOME>/cfgtoollogs/opatch/opatch2020-02-17_15-21-52PM.log

Patch history file: <ORACLE_HOME>/cfgtoollogs/opatch/opatch_history.txt

Unable to lock Central Inventory. OPatch will attempt to re-lock.
Do you want to proceed? [y|n]
n
User Responded with: N
Unable to lock Central Inventory. Stop trying per user-request?
LsInventorySession failed: Unable to lock Central Inventory. Stop trying per user-request?

OPatch failed with error code 73

The Opatch log shows below entries:

Filename = opatch<Date-Time>.log
See the following error:
SEVERE:OPatch invoked as follows: 'lsinventory '
INFO:
Oracle Home       : <ORACLE_HOME>
Central Inventory : /u01/app/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.2
OUI version       : 12.2.0.1.0
OUI location      : <ORACLE_HOME>/oui
Log file location : <ORACLE_HOME>/cfgtoollogs/opatch/opatch2020-02-17_15-21-52PM.log

INFO:Patch history file: <ORACLE_HOME>/cfgtoollogs/opatch/opatch_history.txt

INFO:Starting LsInventorySession at Mon Feb 17 15:21:53 GMT 2020
INFO:Unable to lock Central Inventory.  OPatch will attempt to re-lock.
Do you want to proceed? [y|n]
INFO:Start to wait for user-input at Mon Feb 17 15:21:53 GMT 2020
INFO:Finish waiting for user-input at Mon Feb 17 15:21:59 GMT 2020
INFO:User Responded with: N
INFO:Unable to lock Central Inventory.  Stop trying per user-request?
SEVERE:OUI-67073:LsInventorySession failed: Unable to lock Central Inventory.  Stop trying per user-request?
INFO:Finishing LsInventorySession at Mon Feb 17 15:21:59 GMT 2020
INFO:Stack Description: java.lang.RuntimeException: Unable to lock Central Inventory.  Stop trying per user-request?
INFO:StackTrace: oracle.opatch.OUISessionManager.lockCentralInventory(OUISessionManager.java:361)
INFO:StackTrace: oracle.opatch.OUISessionManager.instantiate(OUISessionManager.java:87)
INFO:StackTrace: oracle.opatch.OUISessionManager.getOUIInventorySession(OUISessionManager.java:571)
INFO:StackTrace: oracle.opatch.InventorySessionManager.getInventorySession(InventorySessionManager.java:49)
INFO:StackTrace: oracle.opatch.Locker.lock(Locker.java:349)
INFO:StackTrace: oracle.opatch.OracleHomeInventory.lock(OracleHomeInventory.java:2085)
INFO:StackTrace: oracle.opatch.OracleHomeInventory.createInventoryObj(OracleHomeInventory.java:2317)
INFO:StackTrace: oracle.opatch.OracleHomeInventory.getInstance(OracleHomeInventory.java:978)
INFO:StackTrace: oracle.opatch.GenericInventory.createInstance(GenericInventory.java:45)
INFO:StackTrace: oracle.opatch.LsInventorySession.process(LsInventorySession.java:317)
INFO:StackTrace: oracle.opatch.OPatchSession.main(OPatchSession.java:1658)
INFO:StackTrace: oracle.opatch.OPatch.main(OPatch.java:630)


CHANGES


CAUSE
Below are possible causes to the issue:

There is a permission problem to access central inventory. Not having WRITE permission on "<oraInventory>/locks" in order to create writer.lock for locking the central inventory.
There is a previously failed installation that left the write.lock in oraInventory/locks.
Opatch is using wrong Inventory location different to the one used when Tuxedo was installed.

SOLUTION
There is a permission problem to access central inventory. Not having WRITE permission on "<oraInventory>/locks" in order to create writer.lock for locking the central inventory.
You may use "ls -la <oraInventory>" to determine whether this condition is true for the user who run the installer.
If this the is case, then ensure central inventory (i.e. oraInventory) has GROUP "WRITE" permission.
There is a previously failed installation that left the write.lock in oraInventory/locks.
If this is the case, then either rename the lock or remove the lock.
Opatch is using wrong Inventory location different to the one used when Tuxedo was installed.
Review the installation log installActions<DATE-TIME>.log under <ORACLE_HOME>/cfgtoollogs/oui directory and look for value given to -invPtrLoc during installation. That would be actual inventory location file to be used on subsequent opatch commands and patches installations.
Snippet of sample installActions<DATE-TIME>.log is shown below:
-invPtrLoc
<ActualInventoryLocationDir>/oraInst.loc

Then run opatch lsinventory as below:
opatch lsinventory -invPtrLoc <ActualInventoryLocationDir>/oraInst.loc

For patches installation, follow Patch Readme file and add -invPtrLoc argument to install the patch, sample shown below:
opatch apply <PatchNumber>.zip -invPtrLoc <ActualInventoryLocationDir>/oraInst.loc


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-30 19:02 , Processed in 0.085895 second(s), 19 queries .

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

© 2001-2020

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