`
cloudtech
  • 浏览: 4613260 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
文章分类
社区版块
存档分类
最新评论

oracle数据库连接hang,出现了两个listener

 
阅读更多
oracle数据库连接hang,出现了两个listener,一个是另一个子进程
处理过程如下
1,出现问题时,用户连接hang住,出现两个listener,现有连接无问题
$ ps -ef|grep lsnr
oracle 26327 1 0 12月 24 ? 5:34 /oracle/product/10.2.0.1/bin/tnslsnr LISTENER -inherit
oracle 16352 12931 1 10:44:26 pts/4 0:00 grep lsnr
oracle 28413 26327 0 21:40:46 ? 0:00 /oracle/product/10.2.0.1/bin/tnslsnr LISTENER -inherit
patrol 29576 29575 0 21:45:19 ? 0:00 /oracle/product/10.2.0.1/bin/lsnrctl stat LISTENER

2,为快速恢复问题,杀掉进程
$ kill -9 26327

3,重启
$ lsnrctl start

LSNRCTL for HPUX: Version 10.2.0.1.0 - Production on 26-DEC-2012 10:44:54

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

Starting /oracle/product/10.2.0.1/bin/tnslsnr: please wait...

TNSLSNR for HPUX: Version 10.2.0.1.0 - Production
System parameter file is /oracle/product/10.2.0.1/network/admin/listener.ora
Log messages written to /oracle/product/10.2.0.1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rps02)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rps02)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for HPUX: Version 10.2.0.1.0 - Production
Start Date 26-DEC-2012 10:44:56
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /oracle/product/10.2.0.1/network/admin/listener.ora
Listener Log File /oracle/product/10.2.0.1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rps02)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

4,恢复正常,只有一个listener
$
$ ps -ef|grep lsnr
oracle 16503 1 0 10:44:56 ? 0:00 /oracle/product/10.2.0.1/bin/tnslsnr LISTENER -inherit
oracle 17637 12931 1 10:48:17 pts/4 0:00 grep lsnr
$

5,后续查询metalink,基本确定为bug,需打oracle Patch 4518443
详见文件Intermittent TNS Listener Hang, New Child Listener Process Forked [ID 340091.1]
除了打补丁,oracle给出的其它解决方案是
a,修改listener.ora文件
SUBSCRIBE_FOR_NODE_DOWN_EVENT_<listener_name>=OFF
b,移动ons.config文件
cd $ORACLE_HOME/opmn/conf
mv ons.config ons.config.ori
6,更详细的原因见参考metalink文档
In this Document
Description
Occurrence
Symptoms
Workaround
Patches
History
References

Applies to:
Oracle Net Services - Version 10.1.0.3.0 to 10.2.0.2.0 [Release 10.1 to 10.2]
Information in this document applies to any platform.
All new connections via TNS listener hang, no errors reported

Checked for relevance on 05-FEB-2010.
***Checked for relevance on 27-nov-2012***


Description

Intermittently the TNS listener hangs and new connections to the database are not possible.



Occurrence

The issue is that the TNS listener can hang under load if a second spawned listener process is not closed (remains persistent). Secondary listener processes are not unusual, depending on traffic as well as when the OS grep snapshot is taken. However, a persistent secondary process (longer than say 5 second) is not normal and may be a result of this referenced problem.

TNS listener can hang at any time and effect standalone or RAC systems
Symptoms

Listener process can also consume high amount of CPU

Child TNS listener process is seen when doing a ps on the listener process, eg.:
$ ps -ef | grep tnslsnr

ora10g 8909 1 0 Sep 15 ? 902:44 /u05/10GHOME/DBHOME/bin/tnslsnr sales -inherit
ora10g 22685 8909 0 14:19:23 ? 0:00 /u05/10GHOME/DBHOME/bin/tnslsnr sales -inherit

Killing the child process allows new connections to work until the problem reoccurs




Workaround


Issue is fixed in 10.2.0.3 Patch Set
Oracle Support recommends patching to 10.2.0.5 as this the lastest release

- OR -

Apply Patch 4518443 for the problem (if a patch is available)

- OR -

As a workaround, two steps should be done:

1. The following parameter can be added to listener.ora
SUBSCRIBE_FOR_NODE_DOWN_EVENT_<listener_name>=OFF

Where <listener_name> should be replaced with the actual listener name configured in the LISTENER.ORA file. This parameter is to be placed by itself on an empty line / at the end of file.

For example, if the listener name is LISTENER (default), the parameter would be:
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF


2. Locate the ons.config file in the 10g(rdbms) home and rename it to something else.
For example:
cd $ORACLE_HOME/opmn/conf
mv ons.config ons.config.orig

The listener needs to be restarted after these changes.

This will both prevent the listener from registering against ONS (Oracle Notification Services), which is the area affected by bug:4518443, as well as disable ONS itself. For more information on ONS, please refer to the specific Oracle documentation, for example, for 10.2, see the Oracle10g Release 2 Oracle Clusterware and Oracle Real Application Clusters Administration and Deployment Guide.

Please note, that adding the SUBSCRIBE_FOR_NODE_DOWN_EVENT_<listener_name> to listener.ora file on RAC and disabling the ONS file, will mean that FAN (fast application notification) will not be possible. See Note 220970.1 RAC: Frequently Asked Questions for further information on FAN. Therefore, if you have a RAC configuration, then apply the patch and do not disable ONS or FAN.

Also, please note that this might happen with ANY 10g installation, whether it is RAC related or not, and whether there is an Oracle Application installation or not.



Patches

Apply Patch 4518443 for the problem (if a patch is available)

参考文档:
《Intermittent TNS Listener Hang, New Child Listener Process Forked [ID 340091.1]》

分享到:
评论

相关推荐

    Oracle数据库监听器(LISTENER)和本地服务名(Tnsname)配置.docx

    Oracle数据库监听器(LISTENER)和本地服务名(Tnsname)配置.docx

    Oracle10g局域网成功连接远程数据库详细步骤

    情景描述:之前都是别人给好一个连接远程Oracle数据库的ip地址,直接在我的客户端的tnsnames.ora文件中添加连接的代码就可以成功的访问远程的Oracle数据库了。但现在的情况是,在局域网中,连接我朋友的Oracle数据库...

    oracle数据库最全收集

    oracle\product\10.2.0\server\NETWORK\ADMIN\Listener.ora b. HOST=计算机名 PORT=1521 (推荐使用) 2) 客户端:可以修改ip、端口号、sid(系统标识符或叫全局数据库名) a. 目录 d:\。。。oracle\product\...

    oracle数据库配置文件

    oracle数据库配置文件,包括:initv6db.ora listener.ora tnsnames.ora

    Oracle SQL Developer连接报错(ORA-12505)的解决方案(两种)

    用oracle数据库新建连接时遇到ora-12505,此问题解决后又出现ora-12519错误,郁闷的半天,经过一番折腾问题解决,下面小编把我的两种解决方案分享给大家,仅供参考。  解决方案一: 今天工作时在新建连接的时候遇到...

    oracle基础教程

    第1章 ORACLE数据库概述 2 1.1 产品概述 2 1.1.1 产品简介 2 1.1.2 基本概念 3 1.2 ORACLE系统结构 4 1.2.2 ORACLE物理结构 4 1.2.3 系统全局区 6 1.2.4 进程 8 1.3 存储管理 9 1.3.2 逻辑结构 10 1.3.3 表(Table)...

    操作系统重装后oracle数据库的恢复

    c、oracle oledb驱动参数的恢复,需要导入oraole1~4.reg,实际只需要导入1~2两个文件即可,其它两个属于注册表的副件。同样需要针对不同版本修改相应的参数。恢复后,可以通过配置一个 oledb测试,最快捷的方法为,...

    构建最高可用Oracle数据库系统 Oracle 11gR2 RAC管理、维护与性能优化

    6.2 Oracle高可用性连接组件 6.2.1 SCAN别名 6.2.2 SCAN监听器 6.2.3 SCAN解析 6.2.4 SCAN兼容性配置 6.2.5动态注册与负载均衡 6.2.6 SCAN配置信息 6.2.7 SCAN VIP与节点VIP 6.2.8 CLUSTER_INTERCONNECTS...

    Oracle数据库异构服务原理及实例说明

    异构服务是集成在Oracle 8i数据库软件中的功能,它提供了从Oracle数据库访问其他非...异构服务扩展了Oracle数据库连接异种数据源的能力,加强了企业数据的整合,是一个快速有效经济地整合企业内部异构数据的解决方案。

    Oracle Database Listener Security Guide

    oracle数据库监听器安全指南 One of the most misunderstood security issues with the Oracle Database is the security of the Listener. Generally, DBAs are not aware that an attacker can easily remotely ...

    ORACLE透明网关连接SQLSERVER操作

    ORACLE透明网关连接SQLSERVER操作 操作过程有截图,内容清晰。 目录 一、 ORACLE透明网关的安装步骤: 二、 配置透明网关文件inittg4msql.ora 三、 配置透明网关的监听器文件LISTENER.ORA 四、 配置透明网关的TNS...

    jfsky.com-Oracle数据库基础知识

    第1章 ORACLE数据库概述 2 1.1 产品概述 2 1.1.1 产品简介 2 1.1.2 基本概念 3 1.2 ORACLE系统结构 4 1.2.2 ORACLE物理结构 4 1.2.3 系统全局区 6 1.2.4 进程 8 1.3 存储管理 9 1.3.2 逻辑结构 10 1.3.3 表(Table)...

    Oracle listener报1067错误

    专门解决Oracle数据库listener报1067错误,简洁有效的解决这个问题,非常实用。

    ORACLE数据库基础知识-华为维护资料

    第1章 ORACLE数据库基础知识 1 1.1 产品概述 1 1.1.1 产品简介 1 1.1.2 基本概念 1 1.2 ORACLE系统结构 2 1.2.1 ORACLE物理结构 2 1.2.2 系统全局区 4 1.2.3 进程 6 1.3 存储管理 7 1.3.1 逻辑结构 8 1.3.2 表...

    数据库实验指导书详细说明

    《ORACLE数据库》实验指导书 实验一 Oracle数据库配置以及基本工具的使用 1.实验的基本内容 实验室中oracle数据库安装后某些服务是关闭的(为了不影响...(2)修改listener.ora 和tnsnames.ora 两个文件的内容....

    Oracle 数据库攻防 英文原版

    Chapter 3 - Attacking the TNS Listener and Dispatchers Chapter 4 - Attacking the Authentication Process Chapter 5 - Oracle and PL/SQL Chapter 6 - Triggers Chapter 7 - Indirect Privilege ...

    linux下oracle安装两个实例一个监听的配置

    oracle两个实例,配置一个监听 主要是修改listener.ora文件和tnsnames.ora文件

    Oracle日常维护故障定位故障排除

    14由于数据库连接数太多导致服务器进程数多或内存耗尽 15由于使用了MTS方式,导致数据库操作特别慢(包括备份) 16由于存在一个大事务操作,导致数据库性能特别差或产生频繁日志切换 17由于没有COMMIT,导致数据库表...

    Oracle的日志管理攻略

     listener的日志文件$ORACLE_HOME/network/log/listener.log记录了通过listener处理的网络请求信息,它包含客户端请求的时间,连接方式(专用或共享),连接程序,网络协议,主机名,网络端口号等信息。  我们也...

Global site tag (gtag.js) - Google Analytics