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

今天在测试的时候,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

a4c26d1e5885305701be709a3d33442f.png

应用正常了,郁闷,unix下启动数据库后还必须手动启动监听吗

a4c26d1e5885305701be709a3d33442f.png,悄悄记载一下。。。。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值