Sunday, June 17, 2012


OEM Grid Agent Re-sync with repository fails

Scenario - 
You have installed the new Agent or re-installed the agent on the same host and deleted the target host configured by old agent from OEM Console 
OR
After unblocking the agents when re-sync is tried, it fails with errors. 


Error –
Agent Operation completed with errors. For those targets that could not be saved, please go to the target's monitoring configuration page to save them. All other targets have been saved successfully. Agent has not been unblocked.

Internal Repository Error Message: SQL Exception occured while syncing pdp settings | Exception: java.sql.SQLException: ORA-20206: Target does not exist: racnode1.localdomain:host 

ORA-06512: at "SYSMAN.MGMT_TARGET", line 571 ORA-06512: at "SYSMAN.MGMT_CREDENTIALS_UI", line 303 ORA-06512: at line 1


[oracle@racnode1 emd]$ /u01/app/oracle/product/agent/agent11g/bin/emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Stopping agent ... stopped.


Cause –
Agent is reinstalled on the host. However, the HOST target has not been discovered by the Agent. The Repository is trying to push the details that it knows about the Host target, but this target no longer exists at the Agent side. Due to this, the Agent Re-synchronization does not complete


Solution –

1) Delete the Agent target from the Grid Console: Targets -> All Targets -> Search: Agent -> Go.
Click on the link for the Agent: agentmachine.domain:3872 -> Click Remove -> Confirm the deletion.


2) Recreate the targets.xml file with the Values from /u01/app/oracle/product/11.1.0/agent11g/sysman/config/emd.properties for targets.xml


agentSeed=852592608
EMD_URL=https://racnode1:3872/emd/main/


-- Backup the old targets.xml file and create new one.
#vi /u01/app/oracle/product/agent11g/sysman/emd/targets.xml
<Targets AGENT_SEED="852592608">              
 <Target TYPE="oracle_emd" NAME="racnode1:3872"/>              
 <Target TYPE="host" NAME="racnode1"/>
</Targets>

Save and exit.


-- Now do the manual discovery using AGENTCA Utility.
[oracle@racnode1 emd]$ /u01/app/oracle/product/11.1.0/agent11g/bin/agentca -d
Stopping the agent using /u01/app/oracle/product/11.1.0/agent11g/bin/emctl  stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Agent is Not Running
Running agentca using /u01/app/oracle/product/agent11g/oui/bin/runConfig.sh ORACLE_HOME=/u01/app/oracle/product/a ACTION=Configure MODE=Perform RESPONSE_FILE=/u01/app/oracle/product/agent11g/response_file RERUN=TRUE INV_PTR_LOC=/u01/cle/product/agent11g/oraInst.loc 

COMPONENT_XML={oracle.sysman.top.agent.10_2_0_1_0.xml}
Perform - mode is starting for action: Configure
Perform - mode finished for action: Configure


-- Next, one has to secure the agent with OMS
[oracle@racnode1 emd]$ /u01/app/oracle/product/11.1.0/agent11g/bin/emctl secure agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Agent is already stopped...   Done.
Securing agent...   Started.
Enter Agent Registration Password :
Securing agent...   Successful.


-- Start the agent.
[oracle@racnode1 emd/u01/app/oracle/product/11.1.0/agent11g/bin/emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Starting agent ..... started.


-- Check the status of the agent.

3 comments:

  1. Thank you so much for sharing this worth able content with us. The concept taken here will be useful for my future programs and i will surely implement them in my study. Keep blogging article like this.
    EMAIL MARKETING

    ReplyDelete