oracle.sysman.emcp.exception.EMConfigException: 启动 Database Control 时出错
帮网友诊断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.