Some when you targets.xml is corrupted or accidently dropped , you need to create it manually. Steps are as below:
1. Create a blank targets.xml file :
cd $ORACLE_HOME/sysman/emd
touch targets.xml
2. After created targets.xml file you need to copy values from $ORACLE_HOME/sysman/config/emd.properties files as below format:
<Targets AGENT_SEED="agentseed from emd.properties">
<Target TYPE="oracle_emd" NAME="hostname and port from emd.properties EMD_URL"/>
<Target TYPE="host" NAME="hostname as it appears in the emd_url"/>
</Targets
Example :
<Targets AGENT_SEED="256896864">
<Target TYPE="oracle_emd" NAME="hostname:3872"/>
<Target TYPE="host" NAME="hostname"/>
</Targets>
First time you start the agent with above file it will itself convert AGENT_SEED parameter to AGENT_TOKEN and value comes in encrypted form
3. To force target re-discovery using below methods:
Run agentca -d as
cd <AGENT_HOME>/bin
agentca -d
1. Create a blank targets.xml file :
cd $ORACLE_HOME/sysman/emd
touch targets.xml
2. After created targets.xml file you need to copy values from $ORACLE_HOME/sysman/config/emd.properties files as below format:
<Targets AGENT_SEED="agentseed from emd.properties">
<Target TYPE="oracle_emd" NAME="hostname and port from emd.properties EMD_URL"/>
<Target TYPE="host" NAME="hostname as it appears in the emd_url"/>
</Targets
Example :
<Targets AGENT_SEED="256896864">
<Target TYPE="oracle_emd" NAME="hostname:3872"/>
<Target TYPE="host" NAME="hostname"/>
</Targets>
First time you start the agent with above file it will itself convert AGENT_SEED parameter to AGENT_TOKEN and value comes in encrypted form
3. To force target re-discovery using below methods:
Run agentca -d as
cd <AGENT_HOME>/bin
agentca -d
very usefull script, Thanks
ReplyDeletethanks mate these things are handy, when problem occurs and we have to look into multiple places to get solution!!!
ReplyDeleteVery good, saved the day.
ReplyDeleteVery Useful thanks !!!
ReplyDelete