数据库学习案例20240306-oracle数据库连接类故障trace

1 数据库连接类故障TRACE 

故障现象

 客户端tnsping ipv6:1521 提示Permission denied,但是在本机是可以链接的。

查看数据库netstat -tunlp|grep 1521

TCP 地址:1521

TCP 不全的IPV6:1521 

没有tcp6协议出现。

故障分析


客户端sqlnet.ora  添加如下内容进行tnsping

Trace_level_client=16
Trace_directory_client=/home/oracle/
Trace_unique_client=on
Trace_timestamp_client=on
Diag_adr_enabled=off
tnsping.trace_directory=/home/oracle/
tnsping.trace_level=admin

#TRACE_LEVEL_SERVER=16
#TRACE_FILE_SERVER=server_trace
#TRACE_DIRECTORY_SERVER=/ogg

查看trc文件


[oracle@orcl-jiekou24 ~]$ more tnsping.trc 

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 06-MAR-2024 22:53:26

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

--- TRACE CONFIGURATION INFORMATION FOLLOWS ---
New trace stream is /home/oracle/tnsping.trc
New trace level is 6
--- TRACE CONFIGURATION INFORMATION ENDS ---
--- PARAMETER SOURCE INFORMATION FOLLOWS ---
Attempted load of system pfile source /u01/app/oracle/product/11.2.0/db_1/network/admin/sqlnet.ora
Parameter source loaded successfully

 -> PARAMETER TABLE LOAD RESULTS FOLLOW <-
Successful parameter table load
 -> PARAMETER TABLE HAS THE FOLLOWING CONTENTS <-
  Diag_adr_enabled = off
  tnsping.trace_level = admin
  tcp.validnode_checking = yes
  tcp.invited_nodes = (10.36.246.176,10.36.246.178,10.36.246.179,10.36.246.180,10.36.246.181,10.36.246.182,10.36.224.0/24,10.36.127.116,10.36.127.117,10.36.245.0/24,10.36.233.91,10.36.201.25,10.36.
60.208,10.36.60.0/24,10.36.200.0/22,10.36.248.0/24,10.36.193.0/24,10.143.13.0/24,1405:8002:5a06:120:10:0:2:27)
  Trace_level_client = 16
  tnsping.trace_directory = /home/oracle/
  Trace_unique_client = on
  sqlnet.inbound_connect_timeout = 30
  Trace_directory_client = /home/oracle/
  Trace_timestamp_client = on
--- PARAMETER SOURCE INFORMATION ENDS ---
--- LOG CONFIGURATION INFORMATION FOLLOWS ---
Log stream will be "standard output"
Log stream validation not requested
--- LOG CONFIGURATION INFORMATION ENDS ---

nlstdipi: entry
nlstdipi: exit
nnfun2awanm: entry
nnfgiinit: entry
nncpcin_maybe_init: default name server domain is [root]
nnfgiinit: Installing read path
nnfgsrsp: entry
nnfgsrsp: Obtaining path parameter from names.directory_path or native_names.directory_path
nnfgsrsp: Parmeter names.directory_path not found, setting path to compiled in default
nnfgspd: entry
nnfgspd:     setting element TNSNAMES
nnfgspd:     setting element HOSTNAME
nnfgspd:     setting element EZCONNECT
nnfgspd:     setting element LDAP
nnfgspd: Path set
nnfgspd: exit
nnfun2a: entry
nlolgobj: entry
nnfgrne: entry
nnfgrne: Going though read path adapters
nnfgrne: Switching to TNSNAMES adapter
nnftboot: entry
nlpaxini: entry
nlpaxini: exit
nnftmlf_make_local_addrfile: entry
nnftmlf_make_local_addrfile: construction of local names file failed
nnftmlf_make_local_addrfile: exit
nlpaxini: entry
nlpaxini: exit
nnftmlf_make_system_addrfile: entry
nnftmlf_make_system_addrfile: system names file is /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
nnftmlf_make_system_addrfile: exit
nnftboot: exit
nnftrne: entry
nnftrne: Original name: orcl6
nnfttran: entry
nnfttran: exit
nnftrne: Using tnsnames.ora address (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =1405:8002:5a06:120:10:0:2:605b)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl))) for name orcl6
nnftrne: exit
nnfgrne: exit
nlolgserv: entry
nnfggav: entry
nnftgav: entry
nnftgav: exit
nnfgfrm: entry
nnftfrm: entry
nnftfrm: exit
nnfgfrm: exit
nlolgserv: exit
nlolgobj: exit
nlolfmem: entry
nlolfmem: exit
nnfun2awanm: Getting the path of sqlnet.ora
nnfun2awanm: Getting the adapter name
nnfun2awanm: exit
snsgblini: exit
nsmal: 272 bytes at 0x1494070
nscall: connecting...
snlinGetAddrInfo: entry
snlinGetAddrInfo: exit
snlinFreeAddrInfo: entry
snlinFreeAddrInfo: exit
nladini: entry
nladini: exit
nladget: entry
nladget: exit
nsmal: 123 bytes at 0x14ab6b0
nsc2addr: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=1405:8002:5a06:120:10:0:2:605b)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
nttbnd2addr: entry
snlinGetAddrInfo: entry
snlinGetAddrInfo: exit
nttbnd2addr: using host IP address: 1405:8002:5a06:120:10:0:2:605b
snlinFreeAddrInfo: entry
snlinFreeAddrInfo: exit
nttbnd2addr: exit
nsmal: 1576 bytes at 0x14ab740
nsmal: 2760 bytes at 0x14abd70
nsmal: 168 bytes at 0x14aca40
nsopen: opening transport...
nttcon: entry
nttcon: toc = 1
nttcnp: entry
nttcnp: exit
nttcni: entry
nttcni: Tcp conn timeout = 60000 (ms)
nttctl: entry
nttctl: Setting connection into non-blocking mode
nttcni: trying to connect to socket 5.
ntt2err: entry
ntt2err: exit
ntctst: size of NTTEST list is 1 - not calling poll
sntpoltst: exit
ntt2err: entry
ntt2err: soc 5 error - operation=1, ntresnt[0]=516, ntresnt[1]=13, ntresnt[2]=0
ntt2err: exit
nttcni: exit
nttcon: exit
nserror: nsres: id=0, op=65, ns=12546, ns2=12560; nt[0]=516, nt[1]=13, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
nsopen: unable to open transport
nsvntx_dei: entry
nsvntx_dei: exit
nsmfr: 2760 bytes at 0x14abd70
nsmfr: 1576 bytes at 0x14ab740
nsmfr: 123 bytes at 0x14ab6b0
nscall: connecting...
nladget: entry
nladget: exit
nsmfr: 272 bytes at 0x1494070
nladtrm: entry
nladtrm: exit
nlse_term_audit: entry
nlse_term_audit: exit

发现在数据传输出现问题。
[oracle@orcl-jiekou24 ~]$ ping6 1405:8002:5a06:120:10:0:2:605b
PING 1405:8002:5a06:120:10:0:2:605b(1405:8002:5a06:120:10:0:2:605b) 56 data bytes
64 bytes from 1405:8002:5a06:120:10:0:2:605b: icmp_seq=1 ttl=60 time=0.316 ms

64 bytes from 1405:8002:5a06:120:10:0:2:605b: icmp_seq=2 ttl=60 time=0.287 ms
64 bytes from 1405:8002:5a06:120:10:0:2:605b: icmp_seq=3 ttl=60 time=0.392 ms
^C
--- 1405:8002:5a06:120:10:0:2:605b ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.287/0.331/0.392/0.049 ms
[oracle@orcl-jiekou24 ~]$ 
[oracle@orcl-jiekou24 ~]$ telnetr
bash: telnetr: command not found...
Similar command is: 'telnet'
[oracle@orcl-jiekou24 ~]$ telnet
telnet> ^C
[oracle@orcl-jiekou24 ~]$ 
[oracle@orcl-jiekou24 ~]$ telnet 1405:8002:5a06:120:10:0:2:605b 152
Trying 1405:8002:5a06:120:10:0:2:605b...
telnet: connect to address 1405:8002:5a06:120:10:0:2:605b: Permission denied
[oracle@orcl-jiekou24 ~]$ telnet 1405:8002:5a06:120:10:0:2:605b 1521
Trying 1405:8002:5a06:120:10:0:2:605b...
telnet: connect to address 1405:8002:5a06:120:10:0:2:605b: Permission denied
[oracle@orcl-jiekou24 ~]$ telnet 10.36.246.91 1521
Trying 10.36.246.91...
Connected to 10.36.246.91.
Escape character is '^]'.
^C^CConnection closed by foreign host.
[oracle@orcl-jiekou24 ~]$ telnet 10.36.246.91 1521
Trying 10.36.246.91...
Connected to 10.36.246.91.
Escape character is '^]'.
^C^CConnection closed by foreign host.
[oracle@orcl-jiekou24 ~]$ 
[oracle@orcl-jiekou24 ~]$ 
[oracle@orcl-jiekou24 ~]$ telnet 1405:8002:5a06:120:10:0:2:605b 1521
Trying 1405:8002:5a06:120:10:0:2:605b...
telnet: connect to address 1405:8002:5a06:120:10:0:2:605b: Permission denied
[oracle@orcl-jiekou24 ~]$ 

换一台正式数据库

[patrol@orcl-jiekou24 ~]$ telnet 1405:8002:5A06:0120:0010:0000:0002:D00C 1521
Trying 1405:8002:5a06:120:10:0:2:d00c...
Connected to 1405:8002:5A06:0120:0010:0000:0002:D00C.
Escape character is '^]'.
^C^CConnection closed by foreign host.
[patrol@orcl-jiekou24 ~]$ 

sysctl -a|grep ipv6


就是没有TCP6:

问题处理

问题处理可以参考metalink文档

ORA-12546 TNS Permission Denied with a remote Client (Doc ID 2420034.1)

What is happening is this:
- Oracle supplies the "address" information (protocol, host, and port) to the Operating System, which in turn gets a TCP
Socket from the Network Stack.
2024/3/6 23:22 Document Display
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=byhznok0_4#CAUSE 3/3
- Oracle sits and waits for the "approval" and a Socket Number.
- In this case, there is an immediate OS error when a Socket should be provided:
ntresnt[1]=13
Unfortunately, this is all external to Oracle and happening at the OS / Network level.
As we are a guest of the Network and System, we have no settings that can "over ride" or workaround such mandatory
communication requirements.
So you need to ask your own Systems / Network Admin to do some in depth analysis of the TCP stack (especially what is
set for limiting remote TCP communications) and find out what is preventing this TCP communication on this address.
Some ideas (again at the Network level):
- check that the hostname(s) and IP address(es) are not "plumbed" (linked) to multiple values.
- check that both lookup and reverse lookup is working.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/725879.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[Redis]——数据一致性,先操作数据库,还是先更新缓存?

目录 一、操作缓存和数据库时有三个问题需要考虑&#xff1a; 1.删除缓存还是更新缓存&#xff1f; 2.如何保证缓存与数据库的操作同时成功或失效 3.先操作缓存还是先操作数据库&#xff08;多线程并发问题&#xff09; 二、 缓存更新的最佳策略 一、操作缓存和数据库时有…

C#使用自定义的方法设计堆栈类

目录 1.首先创建一个名为Clist的类 2.接下来创建一个名为CStack的类 3.最后使用CStack类和Push方法来添加和遍历堆栈数据 4.运行结果 本实例展示了如何使用C#创建一个带有Push方法和Clist类的CStack类&#xff0c;并如何在其中添加和遍历堆栈数据。 1.首先创建一个名为Cli…

深度学习-多层神经网络

文章目录 多层深度神经网络一.黑箱&#xff1a;深层神经网络的不可解释性二.多元神经网络&#xff1a; 层与 h ( z ) h(z) h(z)三.激活函数 多层深度神经网络 从单层到多层是神经网络发展史上的重大变化&#xff0c;层的增加彻底将神经网络的性能提升到了另一个高度&#xff0…

「Vue3系列」Vue3 Axios详解

文章目录 一、Vue3 Axios二、Vue3 Axios 请求配置项三、Axios 响应结构四、Axios 拦截器请求拦截器响应拦截器拦截器的移除拦截器的应用场景 五、相关链接 一、Vue3 Axios 在 Vue 3 中&#xff0c;你可以使用 axios 来执行 AJAX 请求。axios 是一个流行的基于 Promise 的 HTTP…

Java面向对象详解以及示例解析

Java面向对象详解 文章目录 Java面向对象详解 面向对象编程&#xff08;Object-Oriented Programming&#xff0c;简称OOP&#xff09;是一种计算机编程模型。其核心在于围绕数据或对象来组织软件设计&#xff0c;而非仅仅依赖于功能和逻辑。这种编程方式更专注于对象与对象之间…

设计模式之依赖倒转原则

目录 1、 基本介绍 2、 应用实例 3、 依赖关系传递的三种方式 (1) 接口传递 (2) 构造方法传递 (3) setter方式传递 4、 注意事项和细节 1、 基本介绍 依赖倒转原则(Dependence Inversion Principle)是指&#xff1a; 高层模块不应该依赖低层模块&#xff0c;二者都应该依…

文字悬浮下划线动态效果

概览 此篇文章主要介绍文字悬浮下划线的动画效果&#xff0c;主要有从左往右和从中间至两边扩散两种动态效果 一. 从左往右 示例代码如下 <!DOCTYPE html> <html><head><meta charset"utf-8"><meta name"viewport" content…

【C语言】C语言编程进阶:异常处理与程序稳定性全攻略

1. 概述 异常处理又称异常错误处理&#xff0c;它提供了处理程序运行时出现任何意外或异常情况的方法。异常处理通常是防止未知错误的发生所采取的处理措施&#xff0c;对于某一类型的错误&#xff0c;异常处理应该提供相应的处理方法。例如&#xff0c;在设计程序时&#xff…

AI智商排名:Claude-3首次突破100

用挪威门萨&#xff08;智商测试题&#xff09;中 35 个问题对chatGPT等人工智能进行了测试&#xff1a; ChatGPT 对ChatGPT进行了两次挪威门萨测试&#xff0c;在 35 个问题中&#xff0c;它平均答对了 13 个&#xff0c;智商估计为 85。 测试方法 每个人工智能都接受了两次…

<商务世界>《第5课 重组、托管是什么?》

1 托管 1.1 案例 2020年10月&#xff0c;国资委决定&#xff0c;由中国宝武钢铁集团有限公司对中国中钢集团有限公司进行托管&#xff0c;这就意味着中钢集团由一个副部级的央企管理了&#xff0c;虽然级别没有变动&#xff0c;但是他的好多决策都不用先汇报给国资委了&#…

MATLAB知识点:循环语句的经典练习题

​讲解视频&#xff1a;可以在bilibili搜索《MATLAB教程新手入门篇——数学建模清风主讲》。​ MATLAB教程新手入门篇&#xff08;数学建模清风主讲&#xff0c;适合零基础同学观看&#xff09;_哔哩哔哩_bilibili 节选自​第4章&#xff1a;MATLAB程序流程控制 下面我们来看…

springmvc的使用方法及运行原理

Spring MVC 是 Spring 框架中用于开发 Web 应用程序的一部分&#xff0c;它基于 MVC&#xff08;Model-View-Controller&#xff09;设计模式&#xff0c;提供了一种灵活且强大的方式来构建 Web 应用。 运行原理&#xff1a; 客户端发送请求&#xff1a;浏览器向服务器发送 H…

贷齐乐错误的waf引起的SQL注入漏洞复现

君衍. 一、环境介绍1、第一道WAF2、第二道WAF 二、环境部署1、模拟源码2、连接数据库源码3、数据库创建4、测试 三、源码分析1、模拟WAF2、注入思路3、PHP下划线特性4、完成假设 四、联合查询注入1、测试回显字段2、爆出库名3、爆出表名4、爆出表下的列名4、爆出flag 一、环境介…

CleanMyMac X4.14.7永久免费Mac电脑清理和优化软件

CleanMyMac X 是一款功能强大的 Mac 清理和优化软件&#xff0c;适合以下几类人群使用&#xff1a; 需要定期清理和优化 Mac 的用户&#xff1a;随着时间的推移&#xff0c;Mac 设备上可能会积累大量的无用文件、缓存和垃圾&#xff0c;导致系统运行缓慢。CleanMyMac X 的智能扫…

【Java JVM】Class 文件

Java 的口号 “一次编写, 到处运行 (Write Once, Run Anywhere)” 的基础: JVM 和 所有平台都统一支持的程序存储格式 – 字节码 (Byte Code)。 只要在对应的平台安装对应的 JVM, 将我们编写的源码编译为 Class 文件, 就能达到了一次编写, 导出运行的目标, 中间的所有细节由不同…

形容passwd和shadow区别

/etc/passwd 存账户信息一般不存密码 /etc/shadow主要用来存密码 /etc/passwd默认是任意用户可读只有root用户可修改 /etc/shadow 默认只有root用户可读可写 /etc/passwd 包含系统用户和用户的主要信息 /etc/shadow 用于储存系统中用户的密码&#xff0c;又称为影子文件 /etc/g…

11.WEB渗透测试-Linux系统管理、安全加固(上)

免责声明&#xff1a;内容仅供学习参考&#xff0c;请合法利用知识&#xff0c;禁止进行违法犯罪活动&#xff01; 内容参考于&#xff1a; 易锦网校会员专享课 上一个内容&#xff1a;10.WEB渗透测试-Linux基础知识-Linux用户权限管理&#xff08;下&#xff09;-CSDN博客 进…

【论文笔记】Language Models are Few-Shot Learners

Language Models are Few-Shot Learners 本部分是 GPT-3 技术报告的第一部分&#xff1a;论文正文、部分附录。 后续还有第二部分&#xff1a;GPT-3 的广泛影响、剩下的附录。 以及第三部分&#xff08;自己感兴趣的&#xff09;&#xff1a;GPT-3 的数据集重叠性研究。 回顾…

部署运维 防火墙,进程 常用命令

防火墙: 1. 查看是否安装了firewalld sudo systemctl status firewalld 查看防火墙状态或者sudo systemctl is-active firewalld 查看防火墙是否是开启状态 2. 开放6379port sudo firewall-cmd --add-port6379/tcp --permanent 刷新防火墙 sudo firewall-cmd --reload 3…

ranger的使用

安装 macOS brew install rangerubuntu sudo apt-get install ranger配置 启动之后ranger会创建一个目录~/.config/ranger 可以使用以下命令复制默认配置文件到这个目录 ranger --copy-configallrc.conf-选项设置和快捷键commands.py-能通过:执行的命令commands_full.py-全套…