环境: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. SwiftUI(一)

    macOS 11.4 Xcode 12.5.1 1.新建工程,创建一个swiftui文件   2.创建后有些画布是在下面显示的     3.先来看下效果图   4. CardImageView.swi ...

  2. YMOI 2019.6.29

    题解 YMOI 2019.6.29 放弃FAIOJ,用cena考了一次试.被全方位吊打.. T1 开灯 题面: 在一条无限长的路上,有一排无限长的路灯,编号为1,2,3,4,--. 每一盏灯只有两种可 ...

  3. 图文并茂使用VUE+Quasar CLI开发和构建PWA,registerServiceWorker介绍

    看文档 文档地址:Preparation for PWA 1.将PWA模式添加到我们的Quasar项目中: npx quasar mode add pwa 我们看一下有哪些变化 向Quasar项目添加 ...

  4. angular--路由导航三种方法

  5. 使用docker安装hadoop(已实现)

    1.拉镜像 这里推荐第一个 docker pull registry.cn-hangzhou.aliyuncs.com/hadoop_test/hadoop_base 或者 docker pull q ...

  6. SQL分类-DDL_操作数据库_创建&查询

    SQL分类 1.DDL(Data Definition Language)数据定义语言 用来定义数据库对象:数据库,表,列等.关键字:create , drop, alter 等 2.DML(Data ...

  7. Fabric2.x中Raft共识算法核心数据结构

    一.共识算法可插拔的代码体现Chain接口 Hyperledger Fabric的共识算法是可插拔的,在代码上体现为Chain接口,所有不同的共识算法均可根据Chain接口进行具体实现,目前fabri ...

  8. 浅谈Pytest中的marker

    浅谈Pytest中的marker 没有注册marker 我们写一个简单的测试 # test_demo.py import pytest @pytest.mark.login def test_demo ...

  9. XMind 2022 Win/macOS 使用教程

    XMind简介 XMind 2022 Win/macOS (强大的思维导图软件).XMind 是一款让你专注思维,捕捉每一个灵感瞬间的 App.每当萌生新想法时,「XMind」帮你专注于它的扩展延伸和 ...

  10. Consul调用no instances或Consul页面All service checks failing

    1.问题体现 Consul中Consumer调用Provider会出现No instances available for XXX 这时打开Consul控制台页面: 可以看到这里出现All servi ...