Friday, March 31, 2006

(upload failed with ret=-10)Can't upload XML agent, after delete old agent

I deleted old agent from EMS server and upload again.

$ ./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

$ ./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.

$ ./emctl upload
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
upload failed with ret=-10


==> emoms.trc <== 

2006-03-31 13:17:46,732 [MetadataLoad https://db1: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 = db1: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://db1: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 = db1:3872)(agent guid = CE6B5C2E232766E01D3803EB03D70128) ORA-06512: at "SYSMAN.TARGETS_INSERT_TRIGGER", 
line 30 ORA-04088: error during execution of trigger 'SYSMAN.TARGETS_INSERT_TRIGGER' 

I used more ideas. but i can resolve this problem, because 

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

I didn't find hosts. 

and

  exec mgmt_admin.cleanup_agent('db1:3872'); 


BEGIN 
mgmt_admin.cleanup_agent('db1:3872'); 
END; 
* ERROR at line 1: 
ORA-01403: no data found 
ORA-06512: at "SYSMAN.EM_MASTER_AGENT", line 1209 
ORA-06512: at "SYSMAN.EM_TARGET", line 825 
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 798 
ORA-06512: at line 1 

However i read from some forums. 

they told me "delete the TARGET_GUID from MGMT_EMD_PING and MGMT_EMD_PING_CHECK." 

I followed, but can't resolve 

So......... 

I had some idea. 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

$ ./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

$ ./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.

$ ./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


................ Oh I can resolve this problem ...................


No comments: