千家信息网

emctl start dbconsole遇到错误:OC4J_DBConsole_XXX _XXX not found.

发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,想启动Oracle的OEM服务,运行emctl start dbconsole,结果出现如下报错信息:/u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee
千家信息网最后更新 2026年11月01日emctl start dbconsole遇到错误:OC4J_DBConsole_XXX _XXX not found.


想启动Oracle的OEM服务,运行emctl start dbconsole,结果出现如下报错信息:
/u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_wjq.comsys.com_OraDB11g not found。要想打开OEM的web管理程序,必须先启动Database listener,再启动Datebase Control端口监控程序,但是碰到下面的问题:


[oracle@wjq ~]$ emctl start dbconsole

OC4J Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_wjq.comsys.com_OraDB11g not found.


其实产生的这样的情况,可能是em资料库配置不正确或者是dbcotrol没有配置好。


解决方法:

①重建em资料

[oracle@wjq ~]$ emca -repos recreate


STARTED EMCA at Nov 3, 2017 4:35:17 PM

EM Configuration Assistant, Version 11.2.0.3.0 Production

Copyright (c) 2003, 2011, Oracle. All rights reserved.


Enter the following information:

Database SID: seiang11g

Listener port number: 1521

Password for SYS user:

Password for SYSMAN user:


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

WARNING : While repository is dropped the database will be put in quiesce mode.

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

Do you wish to continue? [yes(Y)/no(N)]: Y

Nov 3, 2017 4:35:34 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/OraDB11g/emca_2017_11_03_16_35_16.log.

Nov 3, 2017 4:35:34 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Nov 3, 2017 4:36:47 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Nov 3, 2017 4:36:47 PM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

Nov 3, 2017 4:40:32 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Enterprise Manager configuration completed successfully

FINISHED EMCA at Nov 3, 2017 4:40:32 PM


②配置dbcontrol

[oracle@wjq ~]$ emca -config dbcontrol db


STARTED EMCA at Nov 3, 2017 2:29:41 PM

EM Configuration Assistant, Version 11.2.0.3.0 Production

Copyright (c) 2003, 2011, Oracle. All rights reserved.


Enter the following information:

Database SID: seiang11g

Listener port number: 1521

Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/dbhome_1 ]:

Password for SYS user:

Password for DBSNMP user:

Password for SYSMAN user:

Email address for notifications (optional):

Outgoing Mail (SMTP) server for notifications (optional):

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


You have specified the following settings


Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1


Local hostname ................ wjq.comsys.com

Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/dbhome_1

Listener port number ................ 1521

Database SID ................ seiang11g

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............


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

Do you wish to continue? [yes(Y)/no(N)]: y^H

Nov 3, 2017 2:30:36 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/OraDB11g/emca_2017_11_03_14_29_40.log.

Nov 3, 2017 2:30:39 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository

INFO: Uploading configuration data to EM repository (this may take a while) ...

Nov 3, 2017 2:32:36 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Uploaded configuration data successfully

Nov 3, 2017 2:32:38 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

WARNING: Error executing /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -host wjq.comsys.com -sid OraDB11g

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

WARNING: Error securing Database control.

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.EMDBPostConfig setWarnMsg

INFO: Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):


1) Set the environment variable ORACLE_UNQNAME to Database unique name

2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole

3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >

4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >

5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole


To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >

Nov 3, 2017 2:32:53 PM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Nov 3, 2017 2:32:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Nov 3, 2017 2:32:58 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>>>>>>> The Database Control URL is http://wjq.comsys.com:5500/em <<<<<<<<<<<


Error securing Database Control. Database Control has been brought-up in non-secure mode. To secure the Database Control execute the following command(s):


1) Set the environment variable ORACLE_UNQNAME to Database unique name

2) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole

3) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -repos -sysman_pwd < Password for SYSMAN user >

4) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl secure dbconsole -sysman_pwd < Password for SYSMAN user >

5) /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl start dbconsole


To secure Em Key, run /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl config emkey -remove_from_repos -sysman_pwd < Password for SYSMAN user >


然后直接进入http://wjq.comsys.com:5500/em/,输入账户sys和密码******,选择sysdba权限,就能正常看到基于WEB的EM了。

Oracle11G
的EM采用了web方式,并且分成了2个产品,database control和grid control。Grid control需要下载单独的光盘安装。在用DBCA建库的时候,可以选择是否启用dbcontrol,启用的话需要在数据库中建立一个sysman的 schema,用于保存EM的一些数据,这个就是EM的资料库(repository)。使用命令行工具emca可以创建,修改,重建或者删除 dbcontrol的配置。


emca -repos create: 创建新的 Database Control 资料档案库
emca -repos drop:
删除当前的 Database Control 资料档案库
emca -repos recreate:
删除当前的 Database Control 资料档案库并重新创建一个
emca -config dbcontrol db
:配置数据库的 Database Control

emca -deconfig dbcontrol db:取消数据库的 Database Control


特别注意:

(1)如果服务器上存在多个数据库,必须在启动Database control之前设置ORACLE_SID环境变量
(2)最好使用静态IP地址来配置服务器



常用的命令语法:

emca -repos create创建一个EM资料库

emca -repos recreate重建一个EM资料库

emca -repos drop删除一个EM资料库

emca -config dbcontrol db配置数据库的 Database Control

emca -deconfig dbcontrol db删除数据库的 Database Control配置

emca -reconfig ports 重新配置db control和agent的端口

emctl start console启动EM console服务,使用前需要先设置ORACLE_SID环境变量

emctl stop console停止EM console服务,使用前需要先设置ORACLE_SID环境变量

注:通过查看$ORACLE_HOME/install/portlist.ini 文件可以知道当前dbcontrol正在使用的端口,默认dbcontrol http端口1158,agent端口3938。如果要重新配置端口,可以使用如下命令:

emca -reconfig ports -dbcontrol_http_port 1159

emca -reconfig ports -agent_port 3939

使用命令行工具emctl可以启动/停止console服务,察看服务状态等。



作者:SEian.G(苦练七十二变,笑对八十一难)


配置 资料 数据 服务 数据库 端口 资料库 命令 变量 档案 档案库 环境 工具 服务器 程序 选择 监控程序 七十二变 产品 作者 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 花魁咖啡 中国互联网科技股 科技互联网政务服务 互联网是不是新科技 金融科技 互联网金融 美国互联网科技 深圳天众互联网科技公司 互联网高科技股票 互联网巨头投资的硬核科技 青海省互联网新科技 中国最先进互联网科技公司 博兴的互联网电子科技公司 随着互联网科技发展 贵州叶脉互联网科技有限公司所属行业 成都铂石互联网科技做什么的 深圳育鹏互联网科技有限公司招聘 卓翼科技产业互联网合作 富国互联网科技002692 信承诺互联网科技有限公司 互联网大会出现的黑科技 小米互联网科技园设置 顶级互联网科技成果有哪些 中化能源互联网科技招聘 互联网时代科技改变生活 来此购互联网科技有限公司 昊天互联网科技有限公司 天津腾达互联网科技有限公司 互联网界的黑科技 颐高云石互联网科技 互联网 科技节活动 微视频大赛
0