首页 > 数据治理 > 数据治理 > Oracle 监听异常处理
操作系统: windows2008
数据库:oracle11g
64-bit Windows: Version 11.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production
问题发生:一套正常跑了一年的应用系统,忽然无法连接上数据库
数据库服务器端查看:
使用 lsnrctl status 查看监听状态卡住,10分钟左右结果才会反馈。
plsql无法连接。
重启监听问题依旧。
alter日志文件中报错:
<msg time='2020-02-24T18:13:09.309+08:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18'>
<txt>
VERSION INFORMATION:
TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 11.2.0.1.0 - Production
</txt>
</msg>
<msg time='2020-02-24T18:13:09.309+08:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18'>
<txt> Time: 24-2月 -2020 18:13:09
</txt>
</msg>
<msg time='2020-02-24T18:13:59.981+08:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18'>
<txt>TNS-12547: TNS: 丢失连接
</txt>
</msg>
<msg time='2020-02-24T18:13:59.981+08:00' org_id='oracle' comp_id='rdbms'
<txt>TNS-12560: TNS: 协议适配器错误
TNS-00530: 协议适配器错误
64-bit Windows Error: 53: Unknown error
TNS-12518: TNS: 监听程序无法分发客户机连接
TNS-12571: TNS: 包写入程序失败
TNS-12560: TNS: 协议适配器错误
TNS-00530: 协议适配器错误
64-bit Windows Error: 54: Unknown error
</txt>
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18'>
<txt> ns secondary err code: 12560
</txt>
</msg>
<msg time='2020-02-24T18:13:59.981+08:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18'>
<txt> nt main err code: 0
</txt>
</msg>
<msg time='2020-02-24T18:13:59.981+08:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18'>
<txt> nt secondary err code: 0
</txt>
</msg>
<msg time='2020-02-24T18:13:59.981+08:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18'>
<txt> nt OS err code: 0
</txt>
</msg>
<msg time='2020-02-24T18:13:59.997+08:00' org_id='oracle' comp_id='rdbms'
type='UNKNOWN' level='16' host_id='WIN-N5BE4BP9FQS'
host_addr='fe80::6925:8e87:23e0:9a12%18' pid='39472'>
<txt>opiodr aborting process unknown ospid (39472) as a result of ORA-609
</txt>
</msg>
报错 ora-12518 监听无法分发客户端连接。 但在oracle中使用 show parameter session 与select count(×) from v$session; 对比发现不是连接数限制问题。
使用tnsping IP 没有反应。
后继续查看listener的log文件 $ORACLE_HOME/network/trace 发现listener.log 文件已经达到4G 无法再继续写入,最后写入日期也在前两天,于是清空该log文件,重新启动监听,正常。
关闭监听
lsnrctl stop
到 listener.log 所在目录
用命令行清空listener.log
echo > listener.log
lsnrctl reload
最终原因发现是log文件写满,看来以后要定期清理这个文件了。这么小一个问题都使应用系统无法连接上,细节决定成败。 此类文件要见一个记录一个 同时在同类系统中排查。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23141985/viewspace-2677076/,如需转载,请注明出处,否则将追究法律责任。