环境:RAC 双节点

发现两个节点的alert日志中出现大量的

opiodr aborting process unknown ospid (150950) as a result of ORA-609

TNS-12537: TNS:connection closed
ns secondary err code: 12560
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0

首先查看下ORA-609解释

oerr ora 609

00609, 00000, "could not attach to incoming connection"
// *Cause: Oracle process could not answer incoming connection
// *Action: If the situation described in the next error on the stack
// can be corrected, do so; otherwise contact Oracle Support.

客户端通过监听器连接ORACLE数据库的过程:

1.客户端连接到监听器
2.监听派生fork一个子进程,交转化为专有服务器进程dedicated database process
3.第2步完成后,监听将客户端的连接转入此专有进程dedicated process
4.服务器进程收到从监听来的连接信息后,需要继续与客户端的连接进行handshake
5.服务器进程与客户端进程交换建立会话需要的信息,如用户名、密码等
6.以上OK后,SESSION OPEN。
在介于3、4步时客户端连接关闭,dedicated database process与客户端通信时发现客户端关闭了。

个人理解可能以下几个方向

1.网络连通不稳定

2.机器的资源

3.连接被防火墙等kill

4.client卡住、崩溃或做了超时设置

可能一、resource_limit  的值为  TRUE,闲置连接资源的大小,如果 当某个会话超过了为其分配的最大idle 时间时,就会抛出错误信息

    可以通过错误中提到的ospid 进程号查出所属的会话及数据库用户
      然后再通过username 去验证对应的Profile 是否有类似资源使用限制
  
    解决方案:
    禁用限制
    alter system set resource_limit = false;
    或者增加IDLE_TIME的设置值

三、DNS解析问题  /etc/resolv.conf

参数修改

Sqlnet.ora: SQLNET.INBOUND_CONNECT_TIMEOUT=180
Listener.ora: INBOUND_CONNECT_TIMEOUT_listener_name=120

1.测试tnsping

[oracle@racdb1 ~]$ tnsping test

TNS Ping Utility for Linux: Version 12.2.0.1.0 - Production on 25-NOV-2020 16:09:41

Copyright (c) 1997, 2016, Oracle. All rights reserved.

Used parameter files:
/u01/app/oracle/product/12.2.0/db_1/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = scan-ip)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = test)))
OK (0 msec)

2.查看hosts文件配置

vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
172.16.0.101 testdb
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 
 

可以尝试使用OS层面的跟踪

ps -ef|grep tnslsnr
grid    11270   1 0 2019 ? 04:00:46   /u01/app/12.2.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
grid    60189    1 0 Apr17 ? 00:12:43   /u01/app/12.2.0/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
grid    60381    1 5 Apr17 ? 13-06:29:50   /u01/app/12.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
grid    150694    1 5 13:50 ? 00:09:13  /u01/app/12.2.0/grid//bin/tnslsnr LISTENER -inherit

如果使用TRACE跟踪,如下:
3. Oracle Net Level 16 Server tracing. Add to server side SQLNET.ORA file
DIAG_ADR_ENABLED=off                  # Disable ADR if version 11g
TRACE_LEVEL_SERVER = 16               # Enable level 16 trace
TRACE_TIMESTAMP_SERVER = ON           # Set timestamp in the trace files
TRACE_DIRECTORY_SERVER = <DIRECTORY>  # Control trace file location

TRACE_FILELEN_SERVER =<n>   #Control size of trace set in kilobytes eg 20480
TRACE_FILENO_SERVER =<n>       #Control number of trace files per process

使用Errorstack方法如下:
4. Errorstack: Setup errorstack to capture failure. This can be particular useful when capturing an Oracle Net client trace is not feasible.
SQL> alter session set events '609 errorstack(3)';

Once a few traces have been collected while the error is reproduced:
SQL> alter session set events '609 off';

2020-11-25T13:53:35.699028+08:00
Auto-tuning: Shutting down background process GTXg
2020-11-25T13:55:14.490613+08:00
Auto-tuning: Starting background process GTXg
Starting background process GTXg
2020-11-25T13:55:14.528882+08:00
GTXg started with pid=705, OS id=168025
2020-11-25T13:55:44.531647+08:00
Auto-tuning: Starting background process GTXh
Starting background process GTXh
2020-11-25T13:55:44.559985+08:00
GTXh started with pid=731, OS id=171140
2020-11-25T13:56:49.633296+08:00
Auto-tuning: Starting background process GTXi
Starting background process GTXi
2020-11-25T13:56:49.660700+08:00
GTXi started with pid=698, OS id=175892
[oracle@ecdb2 trace]$ tail -f alert_qqd2.log
Auto-tuning: Starting background process GTXj
Starting background process GTXj
2020-11-25T14:17:00.240968+08:00
GTXj started with pid=654, OS id=64586

参考链接:http://www.cnblogs.com/mfrbuaa/p/5347705.html

ORACLE 遇到ORA 03113 数据库连接卡住的更多相关文章

  1. oracle tnsnames.ora文件用法说明

      oracle tnsnames.ora文件用法说明 CreationTime--2018年8月10日08点32分 Author:Marydon 1.用途 oracle客户端所需要的一个文件,通过该 ...

  2. Oracle sqlnet.ora配置

    Oracle sqlnet.ora配置 sqlnet.ora的作用(官网指出的)   www.2cto.com 1.限制客户端访问(如指定客户端域为不允许访问) 2.指定命名方法(local nami ...

  3. oracle执行update语句时卡住问题分析及解决办法

    转载:http://www.jb51.net/article/125754.htm 这篇文章主要介绍了oracle执行update语句时卡住问题分析及解决办法,涉及记录锁等相关知识,具有一定参考价值, ...

  4. LR连接oracle时出现:SQLState=28000[Oracle][ODBC][Ora]ORA-01017:invalid username/password;logon denied

    出现的现象:

  5. [oracle] listener.ora 、sqlnet.ora 、tnsnames.ora

    路径 $ORACLE_HOME/network/admin sqlnet.ora(客户及服务器端) 作用类似于linux或者其他unix的nsswitch.conf文件,通过这个文件来决定怎么样找一个 ...

  6. oracle: listener.ora 、sqlnet.ora 、tnsnames.ora的配置及例子

    1.解决问题:TNS或者数据库不能登录.      最简单有效方法:使用oracle系统提供的工具 netca 配置(把原来的删除掉重新配置)     $netca  2.然而,仍有疑问:如何指定'l ...

  7. Oracle 客户端免安装数据库连接

    PLSQL Developer 连接数据库需要安装Oracle客户端,在这里介绍一种Oracle客户端解压式安装,而不是exe安装. 安装步骤: 1:确定客户端安装所在主机的系统位数 2:选择正确的客 ...

  8. oracle listener.ora文件配置

    # listener.ora Network Configuration File: /oracleDB/product//db_1/network/admin/listener.ora # Gene ...

  9. oracle listener.ora的host不能使localhost,而应该是该机器名,否则不能用ip地址进行连接

    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/lis ...

  10. Oracle tnsnames.ora

    安装过ORACLE的都知道,oracle安装时需要进行配置,这个配置可以在客户端的企业管理器一步一步进行,或者直接拷贝一个tnsnames.ora文件到安装目录下(c:\app\Administrat ...

随机推荐

  1. python之路34 MySQL 2 配置文件 字段类型

    字符编码与配置文件 1.\s查看MySQL相关信息 当前用户.版本.编码.端口号 MySQL5.6及之前的版本编码需要人为统一 之后的版本已经全部默认统一 如果想要永久修改编码配置 需要操作配置文件 ...

  2. HHKB Programming Contest 2022 Winter(AtCoder Beginner Contest 282)

    前言 好久没有打 AtCoder 了.有点手生.只拿到了 \(\operatorname{rk}1510\),应该上不了多少分. 只切了 \(\texttt{A,B,C,D}\) 四题. A - Ge ...

  3. Nodejs后端自动化测试

    偶然看到收藏一下 const puppeteer = require('puppeteer'); const fs = require('fs'); (async () => { const b ...

  4. 动力节点—day06

    常用类 String String表示字符串类型,属于引用数据类型,不属于基本数据类型 在Java中随便使用双引号括起来的都是String对象,例如"abc"."def& ...

  5. Codeforces Round #601 (Div. 2) A-E

    比赛链接 A 题意 给两个数字 \(a,b\) ,每次操作可以使 \(a\) 加上 \(+1,+2,+5,-1,-2,-5\) 中的一个数,求最少多少次操作可以将 \(a\) 变成 \(b\) . 题 ...

  6. C#高性能数组拷贝实验

    前言 昨天 wc(Wyu_Cnk) 提了个问题 C# 里多维数组拷贝有没有什么比较优雅的写法? 这不是问对人了吗?正好我最近在搞图像处理,要和内存打交道,我一下就想到了在C#里面直接像C/C++一样做 ...

  7. final关键字用于修饰局部变量-final关键字用于修饰成员变量

    final关键字用于修饰局部变量 局部变量--引用类型 引用类型的局部变量,被final修饰后,只能指向一个对象,地址不能再更改.但是不影响对象内部的成员变量值的 修改,代码如下: public cl ...

  8. 关于xlrd最新版本不支持.xlsx文件的解决办法

    #卸载已安装的 pip uninstall xlrd #下载对应的版本 pip install xlrd==1.2.0 #卸载已安装的pip uninstall xlrd #下载对应的版本pip in ...

  9. 【踩坑记录】@Transactional注解回滚不生效问题

    @Transactional属于是Spring的常用事务处理注解了,最近在开发时偶然发现这个东西竟然不是100%生效的. 问题重现: 测试一个批处理方法,方法上加了@Transactional后执行, ...

  10. 【Oculus Interaction SDK】(七)使用射线进行交互(物体 & UI)

    前言 这篇文章是[Oculus Interaction SDK]系列的一部分,如果发现有对不上的对方,可以回去翻看我之前发布的文章,或在评论区留言.如果文章的内容已经不适用于新版本了,也可以直接联系我 ...