Close Menu
  • Home
  • Oracle
    • ASM
    • Data Guard
    • RAC
  • Performance
  • Tools
  • Troubleshooting
  • Python
  • Shell Script
Search

Oracle home is already provisioned for the target – Fleet Maintenance

2026-04-16 Oracle By Henrique

OEM PAM Authentication Failure — Fix with SSH Key Named Credentials

2026-04-16 Tools By Henrique

PRCD-1229 — srvctl Refuses Database Access After Manual Upgrade in Oracle RAC

2026-04-16 Oracle By Henrique
YouTube LinkedIn RSS
  • About
  • Contact
  • Legal
    • Cookie Policy
    • Disclaimer
    • Privacy Policy
    • Terms of Use
  • RSS
  • English
    • Portuguese (Brazil)
Execute StepExecute Step
YouTube LinkedIn RSS
  • Home
  • Oracle
    • ASM
    • Data Guard
    • RAC
  • Performance
  • Tools
  • Troubleshooting
  • Python
  • Shell Script
Execute StepExecute Step
Home » EMD runCollection Error – OEM Agent Running but Not Collecting Metrics
OEM Oracle Tools

EMD runCollection Error – OEM Agent Running but Not Collecting Metrics

HenriqueBy Henrique2026-04-144 Mins Read
Share
Facebook Twitter LinkedIn Pinterest Email Telegram WhatsApp

This post is also available in: Português (Portuguese (Brazil))

The Oracle Enterprise Manager agent is up, the heartbeat with OMS is fine, but metrics simply aren’t arriving. When you try to force a manual collection, you get this:

EMD runCollection error:connection to the agent has been lost

This happens even when emctl status agent reports Agent is Running and Ready. The process is alive — but its internal state is corrupted or out of sync with the OMS.


Why This Happens

The agent tracks upload progress and in-flight collections using state files under $AGENT_INST/sysman/emd/state/. When the agent is interrupted abruptly — power loss, a forced kill, host reboot, or network instability — those files are left in an inconsistent state.

The agent process starts normally, heartbeat works, but the OMS communication layer fails when trying to resume the pending operations. The result: an agent that responds to heartbeats but can’t execute metric collections.


Diagnosis

Before applying the fix, confirm this is a corrupted state issue and not a connectivity or OMS availability problem.

1. Check the full agent status:

./emctl status agent

Key fields to review:

  • Heartbeat Status should be Ok
  • Last successful upload should show a recent timestamp
  • Collection Status should show Collections enabled

If Heartbeat Status shows OMS is unreachable, the problem is not corrupted state — it’s a connectivity issue. See “When This Won’t Work” below.

2. Try forcing a collection on the problematic target:

./emctl control agent runCollection <TARGET_NAME>:<TARGET_TYPE> <COLLECTION_NAME>

Example with an Oracle Home target:

./emctl control agent runCollection OraDB19Home1_2_oracleserver_6741:oracle_home oracle_home_config

If you get EMD runCollection error:connection to the agent has been lost, the state is corrupted. Proceed with the solution below.


Solution

The correct sequence is: clear corrupted state → force upload → verify.

⚠️ Warning: emctl clearstate discards pending state files. Any collection data not yet uploaded to the OMS repository will be lost. In production environments with active alerts, confirm OMS is reachable before running this.

Step 1 — Clear the agent state:

./emctl clearstate agent

Expected output:

Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
EMD clearstate completed successfully

Step 2 — Force an upload to OMS:

./emctl upload

Expected output:

Oracle Enterprise Manager Cloud Control 13c Release 4
Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

Step 3 — Verify agent status:

./emctl status agent

Confirm that Last successful upload has been updated and Heartbeat Status is Ok.

Step 4 — Test the collection again:

./emctl control agent runCollection OraDB19Home1_2_oracleserver_6741:oracle_home oracle_home_config

Expected output:

EMD runCollection completed successfully

Quick Reference

./emctl status agent

./emctl clearstate agent

./emctl upload

./emctl status agent

./emctl control agent runCollection <TARGET>:<TYPE> <COLLECTION>

When This Won’t Work

clearstate solves corrupted internal state. If the root cause is something else, the steps above won’t help:

Additional symptomLikely causeNext step
Heartbeat Status: OMS is unreachableNetwork or invalid certificateCheck connectivity, re-secure agent
Upload returns authentication errorStale agent certificateRun emctl secure agent
clearstate fails with OutOfMemoryErrorstate/ directory bloated with corrupt filesManually move state/ contents before clearstate
Issue persists after clearstate + uploadVersion-specific bugOpen SR with gcagent.log and emagent.nohup

For the bloated state/ scenario, move the contents manually before running clearstate:

cd $AGENT_INST/sysman/emd
mkdir state-backup-$(date +%Y%m%d)
mv state/* state-backup-$(date +%Y%m%d)/
./emctl clearstate agent
./emctl start agent
./emctl upload

References

  • Oracle Docs — Enterprise Manager Cloud Control Administrator’s Guide: emctl Commands
  • MOS Note 1902124.1 — EM12c: emctl start agent Fails With Target Interaction Manager failed (verify applicability for your version)

agent emctl oem troubleshooting
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
Previous ArticleOracle RAC 12.2 on VMware Workstation – Post 5: Post-Installation and Final Validation
Next Article PRCD-1229 — srvctl Refuses Database Access After Manual Upgrade in Oracle RAC

Related Posts

Oracle

Oracle home is already provisioned for the target – Fleet Maintenance

2026-04-16
Read More
Tools

OEM PAM Authentication Failure — Fix with SSH Key Named Credentials

2026-04-16
Read More
Oracle

PRCD-1229 — srvctl Refuses Database Access After Manual Upgrade in Oracle RAC

2026-04-16
Read More
Add A Comment
Leave A Reply Cancel Reply

Demo
Follow Me
  • Email
  • GitHub
  • LinkedIn
  • RSS
  • YouTube

INS-06006 – Passwordless SSH Connectivity Not Set Up

2026-02-2614 Views

ORA-29548 — How to Fix “Java System Class Reported” in Oracle Database

2026-03-0510 Views

PRVG-2002 — How to Fix “Encountered Error in Copying File” in Oracle RAC

2026-03-078 Views
Demo
Execute Step
YouTube LinkedIn RSS
  • Home
  • About
  • Contact
  • RSS
  • English
    • Português (Portuguese (Brazil))
© 2026 ExecuteStep. Designed by ThemeSphere.

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.