15 July 2012

Agent 's Target Host unavailable

Symptoms:

After the agent install, Agent's target host is not listed in the OEM Console

Reason: Agent is out-of-sync with OMS and several trials of uploading doesn't help/ Agent was reinstalled/moved

Re-synchronization of the agent fails with the error below:

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: agentmachine.domain:host ORA-06512: at "SYSMAN.MGMT_TARGET", line 571 ORA-06512: at "SYSMAN.MGMT_CREDENTIALS_UI", line 303 ORA-06512: at line 1

 
 
Solution:
 
1. Shutdown the agent from the terminal: AGENT_HOME/bin emctl stop agent
 
2. Logon the OEM Console as SYSMAN or the user with Super User privileges.
 
3. Delete the Agent from OEM Console, ( Make sure all the targets monitored by this agent is deleted before-hand)
 
    Home Page --> Targets --> All Targets --> Select Agent from search box --> Agent --> GO
 
     Click the radio button next to the Agent you wish to delete and then select Remove
 
 
4. Confirm that the agent is deleted:
 
   Home Page --> setup --> Management Services and Repository
 
  Scroll down and select Deleted Targets
 
 
5. Re-create the targets.xml
 
  cd $AGENT_HOME/sysman/emd/
 
  cp -p targets.xml targets_old.xml
 
  touch targets.xml
 
 
6. Copy the AgenSeed and WMD_URL from emd.properties file:
 
   cd $AGENT_HOME/emd/config
 
   cat emd.properties | grep agentSeed
 
   agentSeed=207388776
 
  cat emd.properties | grep EMD_URL
 
  EMD_URL=http://pracdbadb033:3872/emd/main/
 
 
7. Fill the targets.xml with the values obtained from emd.props file
 
Targets AGENT_SEED="207388776"


Target TYPE="oracle_emd" NAME="pracdbadb033:3872"/

Target TYPE="host" NAME="pracdbadb033"/>/Targets 







8. Run Agentca from AGENT_HOME/bin

   cd $AGENT_HOME/bin

   agentca -d

  ###################################################


The action configuration is performing

------------------------------------------------------

The plug-in Agent Configuration Assistant is running


9. Secure and start the agent

   cd $AGENT_HOME/bin
    emctl secure agent
 
     emctl start agent

    emctl upload agent


10. Now you should see the Host displayed in the Console.
Performing free port detection on host=pracdbadb033
Performing targets discovery and agent configuration

Starting the agent

AgentPlugIn:agent configuration finished with status = true



The plug-in Agent Configuration Assistant has successfully been performed

------------------------------------------------------

The action configuration has successfully completed

###################################################

 
 

No comments:

Post a Comment