Posted by John Hallas on January 7, 2009
We have a data (normal usage) and a management connection to each server.
In one case the /etc/hosts file has been set up incorrectly so that the entry looked like
10.1.2.3 server.unix.companyname.net server-data server
When the agent was started it registered the targets on that server as
whereas we wanted it to match all the others servers and use the full name and not the alias
I deleted all the targets I could from grid control but could not remove the host and the agent.
I tried every permutation of emctl remove target but still with no success so I decided to do it from the management server side.
select distinct target_name,target_type from SYSMAN.MGMT$TARGET where target_name like ‘%server%’
SQL> select distinct target_name,target_type from SYSMAN.MGMT$TARGET where target_name like ‘%server%’
SQL> exec sysman.mgmt_admin.cleanup_agent(‘server-data.unix.companyname.net:3872′);
SQL> exec sysman.mgmt_admin.cleanup_agent(‘server-data.unix.companyname.net ‘);
PL/SQL procedure successfully completed.
SQL> select distinct target_name,target_type from SYSMAN.MGMT$TARGET where target_name like ‘%server%’;
no rows selected
I was then in a position to do a discover and re-register the server with OMS
Posted in Grid control and agents, Oracle | Tagged: admin.cleanup_agent, emctl, remove grid agent, remove OMS entry | Leave a Comment »
Posted by John Hallas on December 10, 2008
This is the standard set of actions that I go through when I have problems with an EM agent that a stop/start/upload does not resolve
The two types of errors I generally see are
EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet..
Starting agent …………………………… started but not ready.
Follow the steps below, which can be cut and pasted
Stop the agent
$AGENT_HOME/bin/emctl stop agent
Remove the old log files from AGENT_HOME/sysman/log
Delete any pending upload files from the agent home
rm -r $AGENT_HOME/sysman/emd/state/*
rm -r $AGENT_HOME/sysman/emd/upload/*
Start the agent
$AGENT_HOME/bin/emctl start agent
Issue an agent clearstate from the agent home
$AGENT_HOME/bin/emctl clearstate agent
Force an upload to the OMS
$AGENT_HOME/bin/emctl upload agent
Finally I sometimes need to re-secure the agent
$AGENT_HOME/bin/emctl secure agent
Posted in Grid control and agents, Oracle | Tagged: clearstate, emctl, enterprise manager, grid agent, upload | Leave a Comment »