Skip to Main Content

Enterprise Manager

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

delete old agent

agaraevDec 14 2005 — edited Mar 27 2009
I removed agent's home directory before removing agent from OMS. Then I installed agent again. Now new agent cann't register in OMS because old agent is not removed properly from repository. I think it's waiting for old agent startup to remove targets. But I have no old agent's home. Help me, please.

--- emagent.trc
2005-12-14 10:05:58 Thread-409606 ERROR upload: Failed to upload file A0000003.x
ml, ret = -6
2005-12-14 10:05:58 Thread-409606 ERROR upload: 3 Failures in a row for A0000003
.xml, we give up
2005-12-14 10:05:58 Thread-409606 ERROR upload: Error in uploadXMLFiles. Trying
again in 72.00 seconds or earlier.
2005-12-14 10:06:01 Thread-622598 WARN upload: FxferSend: received fatal error
in header from repository: https://infra02.severstal.severstalgroup.com:4888/em/
upload
FATAL_ERROR::500|ORA-20618: The specified agent is in the process of being delet
ed from the repository, wait for deletion to complete before restarting the agen
t.(agent name = cl02.severstal.severstalgroup.com:3872)(agent guid = 8DF463D651B
7FE9146F36462A94FDA5F)
ORA-06512: at "SYSMAN.TARGETS_INSERT_TRIGGER", line 30
ORA-04088: error during execution of trigger 'SYSMAN.TARGETS_INSERT_TRIGGER'

2005-12-14 10:06:01 Thread-622598 ERROR upload: number of fatal error exceeds th
e limit 3
2005-12-14 10:06:01 Thread-622598 ERROR upload: agent will shutdown now
2005-12-14 10:06:01 Thread-622598 ERROR : Signalled to Exit with status 55
2005-12-14 10:06:01 Thread-16384 ERROR main: EMAgent abnormal terminating
---

Comments

446588
Hi,

I had the same problem - and still have.

Have a look at
http://www.dbazine.com/blogs/blog-cf/chrisfoot/10goemlessons
http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-17.7657940139
https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=290527.1 (Password required).

Since you're running not the newest Grid Control you are not able to re-incarnate a used agent! Unfortunately I have no idea which tables hold information about the old agent.

I solved the problem by using a host-alias - all occurrences of $HOSTNAME in emd.properties and targets.xml are substituted by $HOSTALIAS.

It's an ugly hack - but it works in my environment (Agent: AIX, Oracle 9i; OEMS: SLES 9, Oracle 9i).

I hope it helps you, too.

Best regards

Andreas
user148120
I posted this before, its easy enough to do ..

As sysman,

begin
mgmt_admin.cleanup_agent('<hostname>:1830');
commit;
end;

Run for each target you want to clean out. hostname has to match what it has in the table it might be hostname or fuly quialified host name. It will complain if you got it wrong
agaraev
Hi Andreas
I use the latest agent and Grid Control (10.2.0.1.0) upgraded from previous release . And I don't know what does "re-incarnate a used agent" means. Can you please tell me how to do it.
Thank you for links. But I can't use them because the articles doesn't solve the problem.
Best regards
Alexander
agaraev
Hi daryle

I'v got "ORA-20206: Target does not exist" message on mgmt_admin.cleanup_agent. There is no the target in sysman.mgmt_targets, but there is a record in sysman.mgmt_targets_delete without delete_complite_time set.

Best regards
Alexander
agaraev
Andreas
I'v got why you think, that I use old agent version. It's my fault. I installed agent, then removed and installed again. Both installations were with the same version. So I mean old agent installation, not version
Best regards
Alexander
user148120
If its the deleted screen thats fine. This should still work.

Execute
SELECT target_name
FROM sysman.MGMT_TARGETS
where target_type = 'oracle_emd'

It has to be in that table for it to work.
You should see something like:
hostname.my.domain.net:1830

Then execute
mgmt_admin.cleanup_agent('hostname.my.domain.net:1830');
commit;
20154
find the TARGET_GUID in MGMT_TARGET_DELETE for the agent you are trying to delete, make sure the delete completion timestamp is set (or delete the row), then delete the TARGET_GUID from MGMT_EMD_PING and MGMT_EMD_PING_CHECK.
agaraev
My problem is solved. I open a TAR on Metalink and was advised to run mgmt_admin.delete_target_internal(<target_name>, <target_type>) for each target without delete_complete_time set.
Thank you all for help
Surachart Opun
Help me
I use 10.2

==> emoms.trc <==
2006-03-31 13:17:46,732 [MetadataLoad https://npmdb1:3872/emd/main:A0000000033.xml] ERROR eml.XMLLoader markFileAsError.846 - Error repeated 30 times: FATAL_ERROR::500|ORA-20618: The specified agent is in the process of being deleted from the repository, wait for deletion to complete before restarting the agent.(agent name = npmdb1:3872)(agent guid = CE6B5C2E232766E01D3803EB03D70128)
ORA-06512: at "SYSMAN.TARGETS_INSERT_TRIGGER", line 30
ORA-04088: error during execution of trigger 'SYSMAN.TARGETS_INSERT_TRIGGER'


==> emoms.log <==
2006-03-31 13:17:52,088 [MetadataLoad https://npmdb1:3872/emd/main:A0000000034.xml] ERROR eml.XMLLoader markFileAsError.846 - Error repeated 31 times: FATAL_ERROR::500|ORA-20618: The specified agent is in the process of being deleted from the repository, wait for deletion to complete before restarting the agent.(agent name = npmdb1:3872)(agent guid = CE6B5C2E232766E01D3803EB03D70128)
ORA-06512: at "SYSMAN.TARGETS_INSERT_TRIGGER", line 30
ORA-04088: error during execution of trigger 'SYSMAN.TARGETS_INSERT_TRIGGER'




How can i resolve this problem?
bazzza
Have you followed the above suggestion?

Bazza
Surachart Opun
I found every tables, that they have "MGMT_*" names and TARGET_GUID be "CE6B5C2E232766E01D3803EB03D70128" , and then i deleted
example
SQL> delete from MGMT_TARGET_ASSOC_INSTANCE where target_guid = HEXTORAW('CE6B5C2E232766E01D3803EB03D70128');
.
.
.


And I uploaded xml agent again

[oracle@npmdb1 config]$ /oracle/product/10.2.0/agent10g/bin/emctl clearstate agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
EMD clearstate completed successfully
[oracle@npmdb1 config]$ /oracle/product/10.2.0/agent10g/bin/emctl start agent
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
Starting agent ........ started.
[oracle@npmdb1 config]$ /oracle/product/10.2.0/agent10g/bin/emctl upload
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully
user702172-Oracle
Could you please provide the exact syntax for this please ?

Thanks
user702172-Oracle
Also if you are getting an error like this :

ORA_20618

You can try this to delete the agent.

SQL> SELECT TABLE_NAME FROM DBA_TAB_COLUMNS WHERE COLUMN_NAME='AGENT_GUID';
MGMT_MASTER_AGENT
MGMT_TARGET_AGENT_ASSOC
MGMT_METRIC_ERRORS
MGMT_CURRENT_METRIC_ERRORS
MGMT_UPDATE_OPERATIONS_DETAILS

SQL> SELECT AGENT_GUID FROM MGMT_MASTER_AGENT;
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
3FADF0B85DE351CDB45FEF1E5BCE705C
3FADF0B85DE351CDB45FEF1E5BCE705C
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
3FADF0B85DE351CDB45FEF1E5BCE705C
588F807405A4CEF6C8D4EDCCD8210952
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
3FADF0B85DE351CDB45FEF1E5BCE705C
3FADF0B85DE351CDB45FEF1E5BCE705C
3FADF0B85DE351CDB45FEF1E5BCE705C
SQL> DELETE FROM MGMT_TARGET_AGENT_ASSOC WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

3 rows deleted.

SQL> DELETE FROM MGMT_METRIC_ERRORS WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

49 rows deleted.

SQL> DELETE FROM MGMT_CURRENT_METRIC_ERRORS WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

11 rows deleted.

SQL> DELETE FROM MGMT_UPDATE_OPERATIONS_DETAILS WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

0 rows deleted.

SQL> COMMIT;

Commit complete.

SQL>


This worked for me. The trick was to read the emagent.trc file and look at the error reported. It said agent_guid not target_guid.

Thanks
-Marc
user702172-Oracle
You can try this to delete the agent.

SQL> SELECT TABLE_NAME FROM DBA_TAB_COLUMNS WHERE COLUMN_NAME='AGENT_GUID';
MGMT_MASTER_AGENT
MGMT_TARGET_AGENT_ASSOC
MGMT_METRIC_ERRORS
MGMT_CURRENT_METRIC_ERRORS
MGMT_UPDATE_OPERATIONS_DETAILS

SQL> SELECT AGENT_GUID FROM MGMT_MASTER_AGENT;
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
3FADF0B85DE351CDB45FEF1E5BCE705C
3FADF0B85DE351CDB45FEF1E5BCE705C
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
3FADF0B85DE351CDB45FEF1E5BCE705C
588F807405A4CEF6C8D4EDCCD8210952
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
2D71E48814F4A66943AD8EF7312D0842
3FADF0B85DE351CDB45FEF1E5BCE705C
3FADF0B85DE351CDB45FEF1E5BCE705C
3FADF0B85DE351CDB45FEF1E5BCE705C
SQL> DELETE FROM MGMT_TARGET_AGENT_ASSOC WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

3 rows deleted.

SQL> DELETE FROM MGMT_METRIC_ERRORS WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

49 rows deleted.

SQL> DELETE FROM MGMT_CURRENT_METRIC_ERRORS WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

11 rows deleted.

SQL> DELETE FROM MGMT_UPDATE_OPERATIONS_DETAILS WHERE AGENT_GUID=HEXTORAW('2D71E48814F4A66943AD8EF7312D0842');

0 rows deleted.

SQL> COMMIT;

Commit complete.

SQL>

This worked for me. The trick was to read the emagent.trc file and look at the error reported. It said agent_guid not target_guid.

Thanks
-Marc
369911
I had the same issue on 10.2.0.4 OMS and Agents. Found the following error in the emagent.trc file:
FATAL_ERROR::500|ORA-20206: Target does not exist: Agent does not exist for ...

I checked the MGMT_TARGETS_DELETE:
select target_name from MGMT_TARGETS_DELETE ;

And the old targets that I had removed earlier on where still there. I tried to remove them with
mgmt_admin.delete_target_internal(<target_name>, <target_type>), but I received an error telling me that it
couldn't find the targets.

So, I tried deleting the rows in MGMT_TARGETS_DELETE as SYSMAN:

1. Backed up the table:
SQL> create table MGMT_TARGETS_DELETE_backup as select * from MGMT_TARGETS_DELETE;

Table created.

2. Deleted the rows:
SQL> delete MGMT_TARGETS_DELETE ;

12 rows deleted.

SQL> commit;

Commit complete.

3. Started the agent again on the remote host... and it finally worked fine.

Hope this helps.
1 - 15
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 24 2009
Added on Dec 14 2005
15 comments
21,146 views