EM13c: OMSPatcher lspatches Command For 13c OMS Fails With Error "OMSPatcher failed with error code 2" (Doc ID 2130059.1)

Last updated on APRIL 27, 2016

Applies to:

Enterprise Manager Base Platform - Version 13.1.1.0.0 and later
Information in this document applies to any platform.

Symptoms

Listing patches for 13c OMS using "omspatcher lspatches" command fails with following error:

======================
$ omspatcher lspatches
OMSPatcher Automation Tool
Copyright (c) 2015, Oracle Corporation. All rights reserved.

OMSPatcher version : 13.6.0.0.0
OUI version : 13.6.0.0.0
Running from : /so1/oracle
Log file location : /so1/oracle/cfgtoollogs/omspatcher/opatch2016-04-21_08-20-42AM_1.log

com.oracle.cie.gdr.external.InventoryException: com.oracle.cie.gdr.external.InventoryException: com.oracle.cie.gdr.utils.GdrException: The gdr meta-data directory /so1/oracle/inventory is invalid or does not exist.
at com.oracle.cie.gdr.external.impl.OracleHomeInventoryImpl.<init>(OracleHomeInventoryImpl.java:57)
at com.oracle.cie.gdr.external.impl.OracleHomeInventoryFactory.createInventory(OracleHomeInventoryFactory.java:54)
at com.oracle.cie.gdr.external.InventoryFactory.getOracleHomeInventory(InventoryFactory.java:99)
at oracle.opatchauto.oms.LsPatchesSession.printInstalledPatchForAllHomes(LsPatchesSession.java:93)
at oracle.opatchauto.oms.LsPatchesSession.process(LsPatchesSession.java:71)
at oracle.opatchauto.oms.OMSPatchingSession.main(OMSPatchingSession.java:576)
at oracle.opatchauto.oms.OPatchAuto.main(OPatchAuto.java:795)
Caused by: com.oracle.cie.gdr.external.InventoryException: com.oracle.cie.gdr.utils.GdrException: The gdr meta-data directory /so1/oracle/inventory is invalid or does not exist.
at com.oracle.cie.gdr.external.impl.OracleHomeInventoryImpl.loadMetaDataHome(OracleHomeInventoryImpl.java:74)
at com.oracle.cie.gdr.external.impl.OracleHomeInventoryImpl.<init>(OracleHomeInventoryImpl.java:51)
... 6 more
Caused by: com.oracle.cie.gdr.utils.GdrException: The gdr meta-data directory /so1/oracle/inventory is invalid or does not exist.
at com.oracle.cie.gdr.MetaDataHome.init(MetaDataHome.java:200)
at com.oracle.cie.gdr.MetaDataHome.<init>(MetaDataHome.java:182)
at com.oracle.cie.gdr.MetaDataHome.<init>(MetaDataHome.java:166)
at com.oracle.cie.gdr.MetaDataHome.<init>(MetaDataHome.java:151)
at com.oracle.cie.gdr.MetaDataHome.<init>(MetaDataHome.java:138)
at com.oracle.cie.gdr.MetaDataHome.<init>(MetaDataHome.java:80)
at com.oracle.cie.gdr.external.impl.OracleHomeInventoryImpl.loadMetaDataHome(OracleHomeInventoryImpl.java:70)
... 7 more
java.lang.RuntimeException: IPMReadServices or IPMRWServices has not been initialized
at oracle.opatch.ipm.IPMReadServices.getRawInventory(IPMReadServices.java:144)
at oracle.opatch.ipm.IPMReadServices.loadInventory(IPMReadServices.java:1016)
at oracle.opatch.opatchsdk.OPatchContext.loadInventory(OPatchContext.java:531)
at oracle.opatch.opatchsdk.OPatchContext.<init>(OPatchContext.java:500)
at oracle.opatch.opatchsdk.OPatchContext.getInstance(OPatchContext.java:182)
at oracle.opatchauto.oms.ESysPatchMetadataCommit.getESysPatchIDsMap(ESysPatchMetadataCommit.java:984)
at oracle.opatchauto.oms.LsPatchesSession.printInstalledPatchForAllHomes(LsPatchesSession.java:112)
at oracle.opatchauto.oms.LsPatchesSession.process(LsPatchesSession.java:71)
at oracle.opatchauto.oms.OMSPatchingSession.main(OMSPatchingSession.java:576)
at oracle.opatchauto.oms.OPatchAuto.main(OPatchAuto.java:795)
LsPatchesSession failed: Cannot access inventory of the Oracle Home..

Following could be the reason for the failure
1. No OMS HOME has been defined in inventory.xml
2. The inventory.xml has been currupted
3. Invalid inventory location in oraInst.loc
4. The comps.xml has been currupted

OMSPatcher failed with error code 2
==========================

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms