修改机器名后 EM dbconsole启不起来。
参考网上提供的几种方法,除了用命令重建EM console,其他都不行。
具体如下:(也可以直接用命令emca -config dbcontrol db -repos recreate)
第一步: 重建EM console
$ emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Feb 22, 2011 2:20:28 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: ####
Listener port number: ####
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: yes
Feb 22, 2011 2:20:59 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at ####/cfgtoollogs/emca/szprod02/emca_2011-02-22_02-20-28-PM.log.
Feb 22, 2011 2:21:00 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Feb 22, 2011 2:21:02 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Feb 22, 2011 2:22:03 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Feb 22, 2011 2:22:03 PM
$emca -config dbcontrol db -repos create (此命令好象得在oracle_home下面执行,否则有可能报错)
STARTED EMCA at Feb 22, 2011 2:25:08 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: ####
Listener port number: ###
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 ................####
Database hostname ................ ####
Listener port number ................ ####
Database SID ................ ####
Email address for notifications ............... ####
Outgoing Mail (SMTP) server for notifications ............... ####
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: yes
Feb 22, 2011 2:26:02 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at ####/cfgtoollogs/emca/szprod02/emca_2011-02-22_02-25-08-PM.log.
Feb 22, 2011 2:26:04 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Feb 22, 2011 2:27:56 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Feb 22, 2011 2:28:05 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Feb 22, 2011 2:29:10 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Feb 22, 2011 2:29:10 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Feb 22, 2011 2:34:00 PM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/oracle/product/10.2.0.1/bin/emctl start dbconsole
Feb 22, 2011 2:34:00 PM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database Control
Refer to the log file at #### /cfgtoollogs/emca/szprod02/emca_2011-02-22_02-25-08-PM.log for more details.
Could not complete the configuration. Refer to the log file at /u01/oracle/product/10.2.0.1/cfgtoollogs/emca/szprod02/emca_2011-02-22_02-25-08-PM.log for more details.
第二步,将已存在的em, oc4j的进程kill掉,再尝试启动dbconsole, 发现报错。ERROR ssl: Open wallet failed, ret = 28750
提示可能ssl证书有问题,可以取消https.即执行emctl unsecure dbconsole, 则dbconsole以http模式开启。如果要再改用https模式可以再执行命令emctl upload 及emctl secure dbconsole.
[oracle@ehrprod persistence]$ emctl unsecure dbconsole
TZ set to Hongkong
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://ehrprod:1158/em/console/aboutApplication
Configuring DBConsole for HTTP... Done.
DBCONSOLE already stopped... Done.
Agent is already stopped... Done.
Unsecuring dbconsole... Started.
DBConsole is now unsecured... Done.
Unsecuring dbconsole... Sucessful.
第三步,再次尝试启dbconsole时,报错 WARN http: snmehl_connect: connect failed to (ehrprod:1158): Connection refused (error = 111)
解决办法是查找emagent的进程,kill掉,再启,最后终于OK了。
[oracle@ehrprod persistence]$ ps -ef | grep emagent
oracle 19843 1 0 14:03 pts/0 00:00:09 /u01/oracle/product/10.2.0.1/bin/emagent
oracle 29162 15448 0 17:04 pts/1 00:00:00 grep emagent
[oracle@ehrprod persistence]$ kill -9 19843
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9480809/viewspace-687722/ ,如需转载,请注明出处,否则将追究法律责任。