OEM 13C Patching Agent: [ERROR- Failed to Update Target Type Metadata]

While applying Patch to OEM13c, specifically to OMS Agent, I got this error when trying to start it back:

Collection Status                            : Collections enabled
Heartbeat Status       : OMS responded illegally [ERROR- Failed to Update Target Type Metadata]
Last attempted heartbeat to OMS              : 2018-04-17 12:12:51
Last successful heartbeat to OMS             : (none)
Next scheduled heartbeat to OMS              : 2018-04-17 12:13:21
---------------------------------------------------------------
Agent is Running and Ready
[oracle@oem13c oms]$ ./emctl upload agent
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload error:full upload has failed: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors. (OMS_DOWN)
[oracle@oem13c oms]$ ./emctl pingOMS
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD pingOMS error: OMS sent an invalid response: “ERROR- Failed to Update Target Type Metadata”

Nice hãn?
I Found to MOS EM 13c Agent : pingOMS error: OMS sent an invalid response: “ERROR- Failed to Update Target Type Metadata” (Doc ID 2318564.1) saying:

“This particular issue is caused when any Agent Plugin is upgraded to a higher level than the OMS plugin.”

The solution according to MOS Doc is to rollback the Agent Plugins ahead to the OMS version. Checking it:
Agent Plugins

[oracle@oem13c oms]$ $ORACLE_HOME/OPatch/opatch lsinventory -details | grep descri
ARU platform description:: Linux_AMD64
Patch description: “EM SI Plugin Bundle Patch 13.2.1.0.170531 (Agent side - monitoring)”
Patch description: “EM Exadata Plugin Bundle Patch 13.2.1.0.170228 (Agent Discovery)”
Patch description: “em db plugin bundle patch 13.2.1.0.170630 (agent discovery)”
Patch description: “em db plugin bundle patch 13.2.1.0.171031 (Agent Monitoring)”
Patch description: “EM-BEACON Bundle Patch 13.2.0.0.161231”
Patch description: “EM-AGENT Bundle Patch 13.2.0.0.171130"

OMS Plugins

[oracle@oem13c oms]$ export ORACLE_HOME=/u01/app/oracle/middleware
[oracle@oem13c oms]$ $ORACLE_HOME/OPatch/opatch lsinventory -details | grep descri
ARU platform description:: Linux_AMD64
Patch description: “EMBP Patch Set Update 13.2.0.0.171017”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
Patch description: “One-off”
/weblogic/j2ee/descriptor/WebAppBaseBean.class --> ORACLE_HOME/wlserver/modules/com.bea.core.descriptor.j2ee_3.0.0.0.jar
/weblogic/j2ee/descriptor/WebAppBaseBeanImpl$SchemaHelper2.class --> ORACLE_HOME/wlserver/modules/com.bea.core.descriptor.j2ee.binding_3.0.0.0.jar
/weblogic/j2ee/descriptor/WebAppBaseBeanImpl$Helper.class --> ORACLE_HOME/wlserver/modules/com.bea.core.descriptor.j2ee.binding_3.0.0.0.jar
Patch description: “JDBC 12.1.3.1 BP1"

I observed that the EM-DB-BP Agent-Side Monitoring (Patch 26955301) by the date on version (month ahead than others): “EM db plugin bundle patch 13.2.1.0.171031 (Agent Monitoring)”. Rolling it back:

[oracle@oem13c oms]$ echo $ORACLE_HOME
/u01/app/oracle/agent/agent_13.2.0.0.0
[oracle@oem13c oms]$ $ORACLE_HOME/OPatch/opatch rollback -id 26955301
Oracle Interim Patch Installer version 13.8.0.0.0
Copyright (c) 2018, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/agent/agent_13.2.0.0.0
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/agent/agent_13.2.0.0.0/oraInst.loc
OPatch version : 13.8.0.0.0
OUI version : 13.8.0.0.0
Log file location : /u01/app/oracle/agent/agent_13.2.0.0.0/cfgtoollogs/opatch/26955301_Apr_17_2018_12_39_25/rollback2018-04-17_12-39-21PM_1.log
OPatch detects the Middleware Home as “/u01/app/oracle/agent”
RollbackSession rolling back interim patch ‘26955301’ from OH ‘/u01/app/oracle/agent/agent_13.2.0.0.0’
Patching component oracle.sysman.db.agent.plugin, 13.2.1.0.0...
RollbackSession removing interim patch ‘26955301’ from inventory
Log file location: /u01/app/oracle/agent/agent_13.2.0.0.0/cfgtoollogs/opatch/26955301_Apr_17_2018_12_39_25/rollback2018-04-17_12-39-21PM_1.log
OPatch succeeded.

After rolling back this patch, Agent started normally:

[oracle@oem13c oms]$ $ORACLE_HOME/bin/emctl start agent
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Starting agent .................... started.
[oracle@oem13c oms]$ $ORACLE_HOME/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.2.0.0.0
OMS Version : 13.2.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/app/oracle/agent/agent_inst
Agent Log Directory : /u01/app/oracle/agent/agent_inst/sysman/log
Agent Binaries : /u01/app/oracle/agent/agent_13.2.0.0.0
Core JAR Location : /u01/app/oracle/agent/agent_13.2.0.0.0/jlib
Agent Process ID : 113716
Parent Process ID : 113638
Agent URL : https://oem13c.sys.utah.edu:3872/emd/main/
Local Agent URL in NAT : https://oem13c.sys.utah.edu:3872/emd/main/
Repository URL : https://oem13c.sys.utah.edu:4903/empbs/upload
Started at : 2018-04-17 12:40:26
Started by user : oracle
Operating System : Linux version 2.6.32-696.20.1.el6.x86_64 (amd64)
Number of Targets : 38
Last Reload : (none)
Last successful upload : 2018-04-17 12:40:59
Last attempted upload : 2018-04-17 12:40:59
Total Megabytes of XML files uploaded so far : 0.14
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 49.39%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2018-04-17 12:40:36
Last successful heartbeat to OMS : 2018-04-17 12:40:36
Next scheduled heartbeat to OMS : 2018-04-17 12:41:38
---------------------------------------------------------------
Agent is Running and Ready

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.