在一台windows 伺服器上安裝了Oracle em grid control 10.2.0.2, 使用已有的資料庫作為資料庫的。
oracle emgrid 的agent 軟體安裝在各個linux 伺服器上,用於監控oracle 資料庫和rac 系統。我安裝的agent 版本是10.2.0.5 。
這個版本安裝決定導致了我最後遇到一個大問題,後面會介紹到。
在使用瀏覽器登入oms 服務端時,主機那個項都是正常訪問的,可以顯示主機的相關資訊,如記憶體,IO 等。
但訪問到資料庫目標時,輸入sys 串連,則出錯了。
檢查記錄檔D:\OracleEMGridControl\oms10g\sysman\log\emoms.log ,報錯如下:
2010-05-24 14:06:09,531 [Thread-27] ERROR em.jobs remoteOp.2114 - DBVerify.remoteOp(): CommException: 出現內部錯誤
2010-05-24 14:06:09,531 [Thread-27] ERROR db.rac populateStatusPage.772 - RacState.populateStatusPage: result from version retrieval had errors.
2010-05-24 14:06:11,593 [EMUI_14_06_11_/console/rac/racState] ERROR db.rac onEndProcess.1069 - RacStateController.onEndProcess: hasErr = true, errType = 6, errMsg= 出現內部錯誤
2010-05-24 14:06:58,312 [MetricCollector:RACHOMETAB_THREAD600:60] ERROR rt.RacMetricCollectorTarget _getAllData.184 - oracle.sysman.emSDK.emd.comm.CommException: Connection timed out: connect
oracle.sysman.emSDK.emd.comm.CommException: Connection timed out: connect
at oracle.sysman.emSDK.emd.comm.EMDClient.getResponseForRequest(EMDClient.java:1541)
at oracle.sysman.emSDK.emd.comm.EMDClient.getMetrics(EMDClient.java:913)
at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab._getAllData(RacHomeTab.java:180)
at oracle.sysman.emo.rac.perform.metric.rt.RacHomeTab.getData(RacHomeTab.java:91)
at oracle.sysman.emo.perf.metric.eng.MetricCached.collectCachedData(MetricCached.java:404)
at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread._collectCachedData(MetricCollectorThread.java:596)
at oracle.sysman.emo.perf.metric.eng.MetricCollectorThread.run(MetricCollectorThread.java:320)
at java.lang.Thread.run(Thread.java:534)
分析和解決過程
第一步,在agent 伺服器上分析agent 是否能將監控資訊上傳到OMS 伺服器上
/u01/oracle/home@webdg1=>servdb1$emctl upload
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully
/u01/oracle/home@webdg1=>servdb1$
如果這一步不成功,就要找agent 的問題,或者網路的問題。
第二步,檢查OMS 端的狀態
D:\OracleEMGridControl\oms10g\opmn\bin>opmnctl status
Processes in Instance: EnterpriseManager0.gridctrl01.htsc.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
DSA | DSA | N/A | Down
LogLoader | logloaderd | N/A | Down
dcm-daemon | dcm-daemon | N/A | Down
OC4J | home | 4576 | Alive
OC4J | OC4J_EMPROV | 4536 | Alive
OC4J | OC4J_EM | 5344 | Alive
HTTP_Server | HTTP_Server | 6080 | Alive
WebCache | WebCache | 3088 | Alive
WebCache | WebCacheAdmin | 2280 | Alive
顯示都是正常的
修改了OMS 伺服器的所在/etc/hosts 檔案,將所有監控的agent 伺服器的ip 主機名稱資訊都加入進去。
這裡監控的伺服器是兩台資料庫伺服器,組成的是一個RAC 叢集。因此,需要將VIP 資訊一起加進去。
192.168.15.215 webdg1.htsc.com webdg1
192.168.15.217 webdg2.htsc.com webdg2
192.168.15.216 webdg1-vip.htsc.com webdg1-vip
192.168.15.218 webdg2-vip.htsc.com webdg2-vip
再配置時,報錯成這樣了。
oracle.sysman.emSDK.emd.comm.CommException: SAXParseException in parsing Response :: Computed columns can be specified only after other columns - SAXParseException in parsing Response :: Computed columns can be specified only after other columns
在metalink 文檔Cannot Configure Grid Targets [ID 840367.1] 中得到這樣解釋:
Cause
The OMS 10.2.0.2 is too old and its not able to parse the response of the 10.2.0.5 agent
Solution
Upgrade the OMS to 10.2.0.4 or 10.2.0.5
這個環境中agent 端確實是10.2.0.5 ,而oms 端是10.2.0.2 。只能升級OMS 了。
更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12