今天在执行emctl stop dbconsole的时候,出现一个错误:
Failed to shutdown database console gracefully
查找metalink原因如下:
1. 问题重现
[oracle@rac1 ~]$ emctl stop dbconsole
TZ set to Asia/Manila
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
https://rac1.domain.com:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
--- Failed to shutdown DBConsole Gracefully ---
failed.
查看$ORACLE_HOME/<host_sid>/sysman/log/emdb.nohup
报错信息:
----- Mon Dec 11 18:12:03 2006::DBConsole. Monitoring Agent+Console -----
----- Mon Dec 11 18:12:03 2006::Console Launched with PID 5270 at time Mon Dec
11 18:12:03 2006 -----
06/12/11 18:12:13 Oracle Application Server Containers for J2EE 10g (9.0.4.1.0)
initialized
----- Mon Dec 11 18:13:34 2006::Agent Launched with PID 7320 at time Mon Dec 11
18:13:34 2006 -----
(pid=7320): starting emagent version 10.1.0.4.1
06/12/11 18:14:10 stack = java.sql.SQLException: Io exception: The Network
Adapter could not establish the connection
2. 原因
Issue is caused by incorrect configuration of the /etc/hosts file :
(问题原因为:没有127.0.0.1 localhost这一行)
192.168.230.66 rac1.domain.com rac1
192.168.230.68 rac1-vip.domain.com rac1-vip
10.10.10.31 rac1-priv.domain.com rac1-priv
192.168.230.67 rac2.domain.com rac2
192.168.230.69 rac2-vip.domain.com rac2-vip
10.10.10.32 rac2-priv.domain.com rac2-priv
3. 解决办法
Correct the hosts configuration file so that it looks like:
[root@rac1 ~]# vi /etc/host
添加 127.0.0.1 localhost
4.验证结果
[oracle@rac1 ~]$ emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://rac1.domain.com:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ......... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/rac1_devdb1/sysman/log
[oracle@rac1 ~]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://rac1.domain.com:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/rac1_devdb1/sysman/log
备注:此问题是我在做vmware复制的时候遇到的一个问题,当把C:/VM/rac1/*的文件拷贝到C:/VM/rac2/下或者在做不同主机copy的时候,/etc/hosts文件中的127.0.0.1会自动消失,会导致节点起不来或者emctl stop dbconsole遇到问题,需要手工修改/etc/hosts文件,添加127.0.0.1 localhost进去,要细心的检查。
参考文献:
Subject: | Failed to shutdown database console gracefully | |||
Doc ID: | 414877.1 | Type: | PROBLEM | |
Modified Date : | 21-DEC-2007 | Status: | PUBLISHED |