How to Fix a Target with a Pending Status in OEM 12cR2

Tags:
Oracle,
Technical Track
The other day we had a situation with an OEM 12cR2. We performed maintenance in a 2-node cluster and both instances came up fine, but one of the instances in OEM's Cluster Database target was showing a pending status. It goes to say that before the maintenance, both showed
as up. So the first thing we did was to bounce the agent and clear its state. [code language="bash"] oracle@testhost [oemagent] /u01/app/oracle/agent/agent12c/bin oracle $ ./emctl stop agent;./emctl clearstate agent;./emctl start agent;./emctl upload agent [/code] But with our luck, that neither helped nor changed anything. The next thing we did was to check if the agent was communicating with the OMS. We checked from the server where the agent resided to see if it was responding. [code language="bash"] oracle@testhost [oemagent] /u01/app/oracle/agent/agent12c/bin oracle $ emctl verifykey Oracle Enterprise Manager Cloud Control 12c Release 2 Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved. ----------------------------------------------------- verifykey: Successfully Completed communication with agent EMD pingOMS completed successfully ----------------------------------------------------- [/code] We concluded that they were communicating, so that was another theory to discard... Then, we tried something that used to work in 11g: move the upload, state directories, and then bounce the agent, clearing the state. [code language="bash"] oracle@testhost[oemagent] /u01/app/oracle/agent/agent12c/sysman/emd oracle $ mv upload upload.27Aug2013 oracle@testhost [oemagent] /u01/app/oracle/agent/agent12c/sysman/emd oracle $ mkdir upload oracle@testhost [oemagent] /u01/app/oracle/agent/agent12c/sysman/emd oracle $ mv state state.27Aug2013 oracle@testhost [oemagent] /u01/app/oracle/agent/agent12c/sysman/emd oracle $ mkdir state oracle@testhost [oemagent] /u01/app/oracle/agent/agent12c/bin oracle $ cd /u01/app/oracle/agent/agent12c/bin oracle@testhost [oemagent] /u01/app/oracle/agent/agent12c/bin oracle $ ./emctl stop agent;./emctl clearstate agent;./emctl start agent;./emctl upload agent [/code] But as you might have guessed by now, this didn't help at all. So the next thing we verified -- and this is where we hit the jackpot -- were the targets that the agent had registered. Here we saw that the Cluster Database wasn't listed. [code language="bash"] oracle@test[oemagent] /u01/app/oracle/agent/agent12c/bin oracle $ emctl config agent listtargets | grep "CLUSTER_TEST" | wc -l 0 [/code] OEM12c has a great feature that allows you to resynch the agent via OEM. Here are the steps:
- Go to Setup --> Manage Cloud Control --> Agents;
- Click on the testdrv01 agent;
- On the drop down menu from Agent, choose Resynchronization;
- Be sure to select "Unblock agent on successful completion of agent resynchronization".