加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

oracle数据库无法连接 The Network Adapter could not establish 

(2013-02-20 16:46:22)
标签:

establish

无法连接

数据库

应用

unix

分类: oracle

今天在测试的时候,http访问远程应用,却报出500错误。

部署后一直是正常的,后来服务器关闭了一次,就成这样了。

所以问题的可能性集中在服务器的配置环境上,先查看中间件日志,发现如下错误:

Caused by: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection

这个错误很明显是连接不到数据库,于是进行了以下步骤:
1、sqlplus - 操作正常

2、查看中间件的lib文件夹 ojdbc14存在

3、进入中间件数据源配置ping数据库 报相同异常 The Network Adapter could not establish the connection

 
有点懵圈了,为什么应用连不上数据库,但本地登陆数据库却没任何问题。
这时想起了数据库监听
执行lsnrctl status
看到了以下赤裸裸的信息
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
执行lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 20-FEB-2013 16:41:22
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Starting /oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /oracle/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /oracle/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                20-FEB-2013 16:41:24
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
http://www/uc/myshow/blog/misc/gif/E___6743EN00SIGG.gifThe Network Adapter could not establish " TITLE="oracle数据库无法连接 The Network Adapter could not establish " />
应用正常了,郁闷,unix下启动数据库后还必须手动启动监听吗http://www/uc/myshow/blog/misc/gif/E___7393ZH00SIGG.gifThe Network Adapter could not establish " TITLE="oracle数据库无法连接 The Network Adapter could not establish " />,悄悄记载一下。。。。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有