注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

装甲步兵

迎春故早发,独自不疑寒。 畏落众花后,无人别意看。

 
 
 

日志

 
 
关于我

欢迎各位朋友加好友,共同交流进步!欢迎讨论编程技术(c/c++,java) 搜索引擎技术 互联网舆情监测技术 历史

网易考拉推荐

java.lang.Exception: UnknownHostException sending request em报错  

2014-03-12 22:16:56|  分类: 数据库 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

今天早上我启动oracle  em报错,查看一下原因:是因为昨天晚上改了主机名而没有改映射 /etc/hosts

改完映射后重新创建监听netca   重建em   emca -config dbcontrol db  

启动em  发现端口变成了5560

启动 监听 查看了一下 HOST 是tyger  连接到实例 OK

打开浏览器使用EM 报错:java.lang.Exception: UnknownHostException sending request

细看了一下 此时的数据库居然用的主机名是  whgg   


1. 查看监听状态  HOST 是tyger

[oracle@tyger ~]$ lsnrctl status



LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-MAR-2014 09:47:04


Copyright (c) 1991, 2005, Oracle.  All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=tyger)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                12-MAR-2014 09:05:45
Uptime                    0 days 0 hr. 41 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tyger)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCL_XPT" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@tyger ~]$ 


2. 查看了一下文件   发现有个目录下还有whgg的配置

[oracle@tyger j2ee]$ pwd
/u01/app/oracle/product/10.2.0/db_1/oc4j/j2ee

[oracle@tyger j2ee]$ ls
deploy_db.ini  isqlplus           OC4J_DBConsole     OC4J_DBConsole_whgg_ORCL
home           oc4j_applications  OC4J_DBConsole_tyger_ORCL


3. 于是我使用-report drop 的方式删除配置

[oracle@tyger ~]$ emca -deconfig dbcontrol db -repos drop


STARTED EMCA at Mar 12, 2014 9:47:28 AM
EM Configuration Assistant, Version 10.2.0.1.0 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:  
Password for SYSMAN user:  
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 12, 2014 9:47:39 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ORCL/emca_2014-03-12_09-47-28-AM.log.
Mar 12, 2014 9:47:39 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Mar 12, 2014 9:47:44 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Mar 12, 2014 9:49:17 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Mar 12, 2014 9:49:17 AM

4. 接着使用 repos recreate 重建配置

[oracle@tyger ~]$ emca -config dbcontrol db -repos recreate


STARTED EMCA at Mar 12, 2014 9:50:00 AM
EM Configuration Assistant, Version 10.2.0.1.0 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 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/10.2.0/db_1


Database hostname ................ tyger
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
Mar 12, 2014 9:50:15 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/ORCL/emca_2014-03-12_09-50-00-AM.log.
Mar 12, 2014 9:50:16 AM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Mar 12, 2014 9:50:17 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Mar 12, 2014 9:50:17 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Mar 12, 2014 9:54:18 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Mar 12, 2014 9:54:27 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 12, 2014 9:56:02 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Mar 12, 2014 9:56:02 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is http://tyger:1158/em <<<<<<<<<<<
Enterprise Manager configuration completed successfully

FINISHED EMCA at Mar 12, 2014 9:56:02 AM

5. 查看此时dbconle 的状态

[oracle@tyger j2ee]$ emctl status dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0  
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://tyger:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running. 
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/tyger_ORCL/sysman/log 


重新使用1158端口登录em 一切正常

  评论这张
 
阅读(50)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017