环境: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. 聊聊MongoDB中连接池、索引、事务

    大家好,我是哪吒. 三分钟你将学会: MongoDB连接池的使用方式与常用参数 查询五步走,能活九十九? MongoDB索引与MySQL索引有何异同? MongoDB事务与ACID 什么是聚合框架? ...

  2. Axure 环境进度条

    步骤一:拖拉摆放好相关控件 1.4个半圆环,一个白色上半圆环 (上白),一个白色下半圆环 (下白),一个灰色上半圆环 (上灰),一个灰色下半圆环 (下灰),排放层次为: 下灰<下白<上灰& ...

  3. Grafana 系列文章(四):Grafana Explore

    ️URL: https://grafana.com/docs/grafana/latest/explore/ Description: Explore Grafana 的仪表盘 UI 是关于构建可视化 ...

  4. 手把手教你用LOTO虚拟示波器搭建测试系统整机

    虚拟示波器如果用于个人的研发调试工作,主要能体现出它的小巧便携以及功能强大.而它的另一个巨大优势,可集成性可定制性高,则是在我们做项目中搭建测试系统的时候才能更好的体现出来. 通常测试系统要求长时间工 ...

  5. 连接KingbaseES异常,致命错误/ 用户"system" Password 认证失败(kbjdbc/autodetected server-encoding to be GB2312...)

    com.kingbase8.util.KSQLException: 致命错误: 用户"system" Password 认证失败(kbjdbc:autodetected serve ...

  6. Spring Cloud 2022.0.1 Spring Cloud Zookeeper4.0

    官网: https://spring.io/ 左侧菜单 向下找到 spring Cloud Zookeeper 所有我们希望看到的都在 Reference Doc 中,点击进入 连接zookeeper ...

  7. IDEA 2022 开启热部署

    POM.XML <dependency> <groupId>org.springframework.boot</groupId> <artifactId> ...

  8. P21_事件传参与数据同步

    事件绑定 在事件处理函数中为 data 中的数据赋值 通过调用 this.setData(dataObject) 方法,可以给页面 data 中的数据重新赋值,示例如下: 事件传参 小程序中的事件传参 ...

  9. 让你VS Code的通过插件扩展,拥有了三头六臂

    VS Code 有一个很强大的功能就是支持插件扩展,让你的编辑器仿佛拥有了三头六臂. 安装 VS Code 插件 提醒:当完成了vscode这些配置后,当我们换一台电脑时,不会还得重新配置吧?放心,我 ...

  10. 使用VSCODE调试STM32的iar工程

    1.打开vscode安装插件 主要用到IAR for visual studio code,没有使用IAR Embedded workbench,在编译的时候卡住,目前不知道什么原因,可能是IAR的版 ...