Wednesday, February 2, 2011

Failed to initialize the target manager

When starting the agent the following error occured :

$ emctl start agent
Oracle Enterprise Manager 10g Release 4 Grid Control 10.2.0.4.0.
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
Starting agent ...... failed.
Failed to initialize the Target Manager.


The problem was that the Grid Control agent $AGENT_HOME/sysman/emd/targets.xml file was empty. I recreated the file using :

$agentca -d -f

Either rediscover(-d) or reconfigure(-f) option is mandatory
From metalink :
How To Recreate a Targets.xml File in Grid Control 10.2.x Using 'agentca' Commands [ID 365252.1]   

$ cd $ORACLE_HOME/sysman/emd   (where $ORACLE_HOME is the Agent's home)
$ touch targets.xml


Once you have created the targets.xml file, view the Agent's $ORACLE_HOME/sysman/config/emd.properties file. 
Copy the values for:
...
agentSeed=12345678
...
EMD_URL=http://hostname.oracle.com:3872/emd/main
...

For example:
<Targets AGENT_SEED="12345678">
            <Target TYPE="oracle_emd" NAME="hostname:3872"/>
            <Target TYPE="host" NAME="hostname"/>
</Targets>


Run agentca -d to force a new discovery of the targets on the host
$agentca -d

password for the agent (DBSNMP} needs to be (re)entered.

No comments:

Post a Comment