Oracle EM Grid Control 11g問題之EMD upload失敗

來源:互聯網
上載者:User

在OEM grid control 11g 安裝完成後,在一個監控伺服器上重裝agent 一下,agent 就不能工作了,使用emctl upload檢查時報錯為”EMD upload error: uploadXMLFiles skipped” 。如下所示:

[Oracle@codb2 ~]$ emctl upload

Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0

Copyright (c) 1996, 2010 Oracle Corporation.   All rights reserved.

---------------------------------------------------------------

EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.

這是Oracle EM Grid Control 11g安裝指導 一文中介紹的安裝EM GRID CONTROL 11G結束後,配置agent時出現的問題。如果你需要知道如何去安裝配置grid control 11g,請參考此文。

這個問題如何解決呢?

首先,我在監控伺服器上,也就是codb2 伺服器上使用emctl verifykey 校正一下。發現是OMS 將這個agent 給block 了。

[oracle@codb2 ~]$ emctl verifykey

Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0

Copyright (c) 1996, 2010 Oracle Corporation.   All rights reserved.

 

-----------------------------------------------------

verifykey: Successfully Completed communication with agent

EMD pingOMS error: Invalid ping response "ERROR-Agent is blocked. Blocked reason is: Agent is out-of-sync with repository. This most likely means that the agent was reinstalled or recovered. Please contact an EM administrator to unblock the agent by performing an agent resync from the console. Please contact EM adminstrator to unblock the agent"

那麼,我就去OEM grid control 11g 的控制台上去解決這個block 。

在控制台主目錄中,選擇未知的對象,代理重新同步,不成功。報錯如下:

“代理操作已完成,  但出現錯誤。對於那些無法儲存的目標,  請轉至目標的監視配置頁以儲存它們。已成功儲存所有其他目標。仍未解除封鎖代理。

與代理通訊時出錯。異常錯誤訊息  - oracle.sysman.emSDK.emd.comm.CommException: IOException in reading Response :: Connection reset “

在介面操作上沒辦法去取消這個代理了。於是乎,我們登入grid control 的資料庫中,去直接修改配置資訊。

使用函數mgmt_admin.cleanup_agent('host:port');  去清理這個agent 。

參數host 和port 的值從監控端伺服器中使用emctl status agent 輸出資訊中取得。

詳細資料如下:

[oracle@codb1 ~]$ emctl status agent

Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0

Copyright (c) 1996, 2010 Oracle Corporation.   All rights reserved.

---------------------------------------------------------------

Agent Version      : 11.1.0.1.0

OMS Version        : 11.1.0.1.0

Protocol Version   : 11.1.0.0.0

Agent Home         : /u01/app/oracle/product/10.2.0/oms/agent11g/codb1.htsc.com.cn

Agent binaries     : /u01/app/oracle/product/10.2.0/oms/agent11g

Agent Process ID   : 21727

Parent Process ID : 21673

Agent URL          : https://codb1.htsc.com.cn:3872/emd/main

Repository URL     : https://htwebapp1:4900/em/upload

Started at         : 2012-05-31 15:54:52

Started by user    : oracle

Last Reload        : 2012-05-31 16:05:04

Last successful upload                        : 2012-05-31 16:10:07

Total Megabytes of XML files uploaded so far :      0.39

Number of XML files pending upload            :         0

Size of XML files pending upload(MB)          :      0.00

Available disk space on upload filesystem     :     44.51%

Last successful heartbeat to OMS              : 2012-05-31 16:22:05

---------------------------------------------------------------

Agent is Running and Ready

請注意這一行

Agent URL          :https://codb1.htsc.com.cn:3872/emd/main

codb1.htsc.com.cn:3872 就是這些參數的值。在sqlplus 中以sysman 使用者登入資料庫,執行

execute mgmt_admin.cleanup_agent('codb1.htsc.com.cn:3872');

執行過程如下:

/u01/oracle/home@webdg2=>emrep$sqlplus sysman/htzq2012

 

SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 31 17:15:54 2012

 

Copyright (c) 1982, 2007, Oracle.   All Rights Reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

 

SQL> execute mgmt_admin.cleanup_agent('codb1.htsc.com.cn:3872');

 

PL/SQL procedure successfully completed.

 

 

接著,我們到監控端伺服器上去清理一些檔案

進入grid control 的安裝目錄,執行下列命令。

rm -r ./sysman/emd/state/*

rm -r ./sysman/emd/collection/*

rm -r ./sysman/emd/upload/*

rm ./sysman/emd/lastupld.xml

rm ./sysman/emd/agntstmp.txt

rm ./sysman/emd/blackouts.xml

rm ./sysman/emd/protocol.ini

 

最後重新設定一下agent

emctl clearstate agent

emctl secure agent

emctl start agent

 

這一切都執行完成後,檢查emctl upload 是不是正常了。

[oracle@codb1 ~]$ emctl upload

Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0

Copyright (c) 1996, 2010 Oracle Corporation.   All rights reserved.

---------------------------------------------------------------

EMD upload completed successfully

執行結果顯示已OK 。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.