幫網友診斷10.2.0.1數據庫安裝后配置EM的問題一例,主要是在EM啟動過程中遇到了錯誤,日志如下:
2009-7-7 20:11:39 oracle.sysman.emcp.EMConfig perform 嚴重: 啟動 Database Control 時出錯 有關詳細資料, 請參閱 oracle\product\10.2.0\db_1\cfgtoollogs\dbca\orcl\emConfig.log 中的日志文件。 2009-7-7 20:11:39 oracle.sysman.emcp.EMConfig perform 配置: Stack Trace: oracle.sysman.emcp.exception.EMConfigException: 啟動 Database Control 時出錯 at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:569) at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:181) at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:150) at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:155) at oracle.sysman.assistants.util.em.EMConfiguration.run(EMConfiguration.java:430) at java.lang.Thread.run(Thread.java:534)
出現錯誤的java stack call是EMDBPostConfig說明em db repository 已經完成配置在嘗試啟動EM,但此時出現了問題。
實際造成該問題的有多種可能性,這里列舉最常見的幾種:
1. 殺毒軟件或者防火墻造成的,這里建議在安裝windows期間徹底關閉殺毒類軟件和Windows自帶的防火墻
2. EM使用的端口已經被其他軟件所占用,建議使用netstat命令診斷,或另擇網絡端口
3. Windows主機名以”U”字母開頭
針對第三種可能性,可以在MOS上找到Note <Problem: Startup: Db Control 10.2.0.1 Fails To Start when the hostname begins with the letter “u”>:
Problem: Startup: Db Control 10.2.0.1 Fails To Start when the hostname begins with the letter "u" Applies to: Enterprise Manager for RDBMS - Version: 10.2.0.1 and later [Release: 10.2 and later ] Symptoms The dbconsole 10.2.0.1 is created with emca.The repository creation completes successfully and the dbconsole is created and configured without any error. The last phase of emca is to start the dbconsole. The standalone agent is started successfully but the dbconsole fails to start. The file $ORACLE_HOME/cfgtoollogs/emca/sid/emca*.log shows: =================================================== 05/11/2005 23:07:49 oracle.sysman.emcp.util.PlatformInterface serviceCommand CONFIG: Waiting for service 'OracleDBConsoleAMITAL' to fully start 05/11/2005 23:07:59 oracle.sysman.emcp.EMConfig perform SEVERE: Error starting Database Control Refer to the log file at d:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\amital\emca_2005-11-05_10-55-42-PM.log for more details. 05/11/2005 23:07:59 oracle.sysman.emcp.EMConfig perform CONFIG: Stack Trace: oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:569) at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:181) Cause This issue can be reproduced on all windows platforms which name begins with the letter u. This issue has been logged in the following bug: Bug:4714774 DBCONSOLE DOES NOT WORK HAVING A HOSTNAME STARTING WITH "U" This bug will be fixed in the patchset 10.2.0.2 Solution Download and apply the RDBMS patchset 10.2.0.2 once/if available or To enable the dbconsole to start successfully, follow the steps listed below: 1. Save the file $ORACLE_HOME\host_SID\sysman\config\emd.properties to emd.properties.orig 2. Update the file $ORACLE_HOME\host_SID\sysman\config\emd.properties, replacing \ with / in the following line: For example change: omsRecvDir=d:\oracle\product\10.2.0\db_1\ukp001_db0\sysman\recv to omsRecvDir=d:/oracle/product/10.2.0/db_1/ukp001_db0l/sysman/recv 3. Stop and restart the DB Control Hdr: 4714774 10.2.0.1 EMCP 10.2.0.1 PRODID-1370 PORTID-912 Abstract: DBCONSOLE DOES NOT WORK HAVING A HOSTNAME STARTING WITH "U" Problem Description ------------------- this seems to be releated to bug 3610052. Having a hostname like u1234, install rdbms10.2. start dbconsole will take 4-5 min. Even if the service is shown as started, dbconsole java processes stops and restarts. Environment Information ----------------------- Test Case Step-by-Step Instructions ----------------------------------- 1. rename the hostanme to uXYZ.... 2. install 10.2 rdbms into its own oraclehome 3. strt listener, create a database using dbca. 4. access the dbconsole page shows: "page cannot be displayed" Check the dbconsole java process in taksmanager , you will easily see, that it is coninously restarting. dbconsole service is shown as "started". Test Case Location ------------------ not needed easy to reproduce Diagnostic Analysis ------------------- run the java command from file emd.nohup file, this will show something like: java...Exception... Malformed \uxxxx encoding. and a java stack trace. I assume that this problem will always happen, having a "\u" in the path for the dbconsole Performance ----------- NLS Information --------------- Patches ------- Log Files Location ------------------ Reproducibility --------------- everytime, only on windows platforms: w2k w2003, windowsXP URL --- not needed Did you test with the latest version? ------------------------------------- yes Available Workarounds --------------------- Change the hostname from uXYZ to UXYZ, do set ORACLE_SID= emca -config dbcontrol db -reposrecreate Related Bugs ------------ 3610052 Hdr: 6313490 10.2.0.1.0 CONSOLE 10.2.0.1.0 PRODID-1370 PORTID-215 4714774 Abstract: 10.2.0.1DBCONSOLE IN A DB CREATED FROM IAS INSTALL FAILS TO START Problem Description ------------------- The dbconsole 10.2.0.1.0 creating is failing while starting the dbconsole dbconsole in a db created from iAS install. as per the logs:- SEVERE: Error starting Database Control Refer to the log file at D:\oracle\product\10.2.0\db_1\cfgtoollogs\emca\mmds\emca_2007-06-19_09-47-70-A M.log for more details. Jun 19, 2007 9:58:17 AM oracle.sysman.emcp.EMConfig perform CONFIG: Stack Trace: oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:569 ) at oracle.sysman.emcp.EMDBPostConfig.invoke Environment Information ----------------------- dbconsole in a db created from iAS install. db console 10.2.0.1.0 on Microsoft Windows Server 2003 The 10g application server version is 10.1.2.0.2. to include January 2007 database and application server CPUs. Applied the database CPU patch and after that reconfigured the Dbconsole . Now it doesn't get configured .Db console generating core dump Test Case Step-by-Step Instructions ----------------------------------- Test Case Location ------------------ Diagnostic Analysis ------------------- Stopped the application server service and then started the dbcosnole .But still getting the error D:\oracle\product\10.2.0\db_1\BIN>emctl status dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Oracle Enterprise Manager 10g is not running. ------------------------------------------------------------------ Logs are generated in directory Asked him to move the file from Oracle_Home>/_/emctl.pid file to another location . Now the dbconsole is started:- >emctl start dbconsole Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 Starting Oracle Enterprise Manager 10g Database Control ...The OracleDBConsoleMM DS service is starting...................The OracleDBConsoleMMDS service was started successfully. D:\oracle\product\10.2.0\db_1\BIN>emctl upload Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet.. Asked him to Edit the file ORACLE_HOME>\oc4j\j2ee\home\applications\dms\WEB-INF\web.xml Still the dbconsole is not getting started .
可能是因為Windows上主機名以”U”字母開頭后導致相關路徑發生了轉義。
可以通過在cmd中輸入hostname來確認Windows上的主機名。
給出了2種解決方案:
1.升級到10.2.0.2以上版本,目前推薦的是10.2.0.5 Patch set; 版本10.2.0.1到10.2.0.3上的bug太多了..
2.修改$ORACLE_HOME\host_SID\sysman\config\emd.properties中的內容,將omsRecvDir變更改成使用斜杠而非反斜杠的路徑形式,并重啟EM.