emctl start dbconsole遇到错误
在虚拟机的测试数据库上,启动emctl start dbconsole的时候,报如下错误:
[oracle@QL ~]$ emctl start dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_test_orcl not found.
网上查找过的资料:
Thread: Issues with DBConsole not starting
https://forums.oracle.com/forums/thread.jspa?threadID=2332536
emctl start dbconsole遇到错误:OC4J Configuration issue
http://space.itpub.net/8183550/viewspace-678624
emca和emctl的日常用法
http://blog.youkuaiyun.com/hproc/article/details/6588766
整理过程:
1. 启动失败后先尝试emca重建服务;
2. emca重建失败,经查需要先删除之前的设置再创建服务
/-----------------------------------------------------/
删除数据库的 Database Control配置
emca -deconfig dbcontrol db
删除一个EM资料库
emca -repos drop
/-----------------------------------------------------/
删除Database Control配置及EM资料库
[oracle@QL ~]$ emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Apr 23, 2013 2:27:28 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 23, 2013 2:27:41 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2013_04_23_14_27_28.log.
Apr 23, 2013 2:27:41 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Apr 23, 2013 2:27:42 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Apr 23, 2013 2:27:43 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/app/oracle/product/11.2.0/db_1/sysman/admin/emdrep/bin/RepManager -connect (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl))) -repos_user SYSMAN -action drop -verbose -output_file /u01/app/oracle/cfgtoollogs/emca/orcl/emca_repos_drop_2013_04_23_14_27_42.log
Apr 23, 2013 2:27:43 PM oracle.sysman.emcp.EMReposConfig invoke
SEVERE: Error dropping the repository
Apr 23, 2013 2:27:43 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_repos_drop_<date>.log for more details.
Apr 23, 2013 2:27:43 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error dropping the repository
Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2013_04_23_14_27_28.log for more details.
Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2013_04_23_14_27_28.log for more details.
——出了点错误。
/-----------------------------------------------------/
配置数据库的 Database Control
emca -config dbcontrol db
创建一个EM资料库
emca -repos create
/-----------------------------------------------------/
配置数据库的Database Control 并创建一个EM资料库
[oracle@QL ~]$ emca -config dbcontrol db -repos create
STARTED EMCA at Apr 23, 2013 2:28:10 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db_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/db_1
Local hostname ................ localhost
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Apr 23, 2013 2:28:26 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2013_04_23_14_28_09.log.
Apr 23, 2013 2:28:27 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Apr 23, 2013 2:34:45 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Apr 23, 2013 2:34:52 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Apr 23, 2013 2:35:35 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Apr 23, 2013 2:35:42 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib
INFO: Software library configured successfully.
Apr 23, 2013 2:35:42 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Deploying Provisioning archives ...
Apr 23, 2013 2:36:30 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary
INFO: Provisioning archives deployed successfully.
Apr 23, 2013 2:36:30 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Apr 23, 2013 2:37:44 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Apr 23, 2013 2:37:44 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Apr 23, 2013 2:38:34 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Apr 23, 2013 2:38:34 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://localhost:5500/em <<<<<<<<<<<
Apr 23, 2013 2:38:41 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING:
************************ WARNING ************************
Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted. The encryption key has been placed in the file: /u01/app/oracle/product/11.2.0/db_1/localhost_orcl/sysman/config/emkey.ora. Please ensure this file is backed up as the encrypted data will become unusable if this file is lost.
***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Apr 23, 2013 2:38:42 PM
/----------------------------------------------------------------/
测试访问成功。
但是只能本机访问EM,换到客户端上还是无法通过https://Linux系统IP:5500/em访问EM。
待查。