RAC升级后,一个节点无法连接数据库,报ORA-12537: TNS:connection closed
RAC从11.2.0.3升级到11.2.0.4后,一个节点的Public IP、VIP无法连接数据库
SQL> CONN SYS/oracle@192.168.122.101:1521/pplus as sysdba
ERROR:
ORA-12537: TNS:connection closed
查看RAC的监听日志:
# cd $ORACLE_BASE/diag/tnslsnr/racdb2/listener/trace/
# vi listener.log
06-MAY-2019 12:13:52 * (CONNECT_DATA=(SERVICE_NAME=posplus)(CID=(PROGRAM=sqlplus)(HOST=racdb1)(USER=grid))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.122.100)(PORT=40081)) * establish * posplus * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
Linux Error: 13: Permission denied
首先想到GRID和Database的是oracle文件权限的问题,都有s权限,确认没有问题
[grid@racdb1 ~]$ ll $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 grid oinstall 209914479 Mar 25 23:39 /home/grid/app/11.2.0.4/grid/bin/oracle
[oracle@racdb1 ~]$ ll $ORACLE_HOME/bin/oracle
-rwsr-s--x 1 oracle asmadmin 239626641 Mar 26 01:36 /home/oracle/app/oracle/product/11.2.0.4/db_1/bin/oracle
然后再用GRID用户去访问Database的HOME目录
[grid@racdb1 ~]$ cd $ORACLE_HOME/bin
-bash: cd: $ORACLE_HOME/bin: Permission denied
果然没有权限
[grid@racdb2 ~]$ ll /home/
total 8
drwxr-xr-x. 7 root oinstall 4096 Mar 23 16:43 grid
drwx------. 8 oracle oinstall 4096 May 6 11:45 oracle
把/home/oracle的权限修改为
chmod g+rx,o+rx /home/oracle
[grid@racdb1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed May 8 10:41:06 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> CONN SYS/oracle@192.168.122.111:1521/posplus as sysdba
Connected.
SQL> CONN SYS/oracle@192.168.122.101:1521/posplus as sysdba
Connected.
SQL> CONN SYS/oracle@192.168.122.110:1521/posplus as sysdba
Connected.
SQL> CONN SYS/oracle@192.168.122.120:1521/posplus as sysdba
至此问题已解决
-------------------------------------------------------------------------------
参考Oracle官方文档:
ORA-12537 / ORA-12547 or TNS-12518 if Listener (including SCAN Listener) and Database are Owned by Different OS User (文档 ID 1069517.1) | 转到底部 |
In this Document
APPLIES TO:Oracle Database - Enterprise Edition - Version 11.2.0.3 and later SYMPTOMSIn environment where listener home (including SCAN listener which resides in GRID Infrastructure/ASM home) and database home are owned by different OS user, ORA-12537 could happen when connecting through listener, when creating database through DBCA, or when installing database software and creating a database in runInstaller. Job Role Separation is a typical example as SCAN and local grid home listener is owned differently than database.
CAUSE1. In environments where the listener is not run in the same ORACLE_HOME where the database resides, the listener owner (including SCAN listener) may not be able to access the oracle binary in the database home. This is common in RAC or whenever a GRID_HOME and a database ORACLE_HOME are installed. As listener owner: $ ls -l $RDBMS_HOME/bin/oracle
ls: /home/oracle/app/oracle/product/11.2/db/bin/oracle: Permission denied 2. Oracle binary in database home has wrong permission: ls -l $RDBMS_HOME/bin/oracle
-rwxr-x--x 1 oracle asmadmin 184286251 Aug 9 16:25 /home/oracle/app/oracle/product/11.2/db/bin/oracle The permission "-rwxr-x--x" is wrong as it's missing suid bit, oracle binary should have permission of 6751: -rwsr-s--x 1 oracle asmadmin 184286251 Aug 9 16:25 /home/oracle/app/oracle/product/11.2/db/bin/oracle
Note: If Job Role Separation is in place, the group will be <asmadmin>, otherwise it will be <oinstall> 3. File System for database home does not support setuid/suid or has nosetuid/nosuid set: mount| grep <mount_point_of_ORACLE_HOME>
/home/oracle on /dev/dsk/diskoracle read/write/nosuid.. 4. RDBMS_HOME/lib has wrong ownership/permission: As listener owner: $ ls -l $RDBMS_HOME/lib
ls: /home/oracle/app/oracle/product/11.2/db/lib: Permission denied 5. Another cause may be permissions on the RDBMS Directory structure or Home directory which needs to be accessed by the CRS user. Also: a) Log in as the "GRID" user on each node, and issue the following (on each directory under the RDBMS Home) :- [grid@orcl002:+ASM2 ~]$ ls -al /home/oracle/app/oracle
ls: cannot open directory /u01/app/oracle: Permission denied ***NOTE: the Oracle directory has 700 for the permissions, which should be changed to 755: Current (incorrect) --> [grid@orcl002:+ASM2 ~]$ ll /home/oracle/app
drwx------. 8 oracle oinstall 4096 Oct 12 08:38 oracle Should be (correct) --> [grid@orcl002:+ASM2 ~]$ ll /home/oracle/app
drwxr-xr-x. 8 oracle oinstall 4096 Oct 12 08:38 oracle b) Likewise the /product directory has 700 perms, so change to 755 --> [grid@orcl002:+ASM2 ~]$ ls -al /home/oracle/app/oracle/product
ls: cannot open directory /u01/app/oracle/product: Permission denied Current (incorrect) --> [grid@orcl002:+ASM2 ~]$ ls -al /home/oracle/app/oracle
drwx------. 3 oracle oinstall 4096 Oct 12 08:58 product Should be (correct) --> [grid@orcl002:+ASM2 ~]$ ls -al /u01/app/oracle
drwxr-xr-x. 3 oracle oinstall 4096 Oct 12 08:58 product c) Now a connection should work: $ sqlplus system/<pwd>@'(description=(address=(protocol=tcp)(host=orcl002)(port=1521))(connect_data=(server=dedicated)(service_name=ORCL)))'
SQL> SOLUTIONSolution is to make sure file system for database home has setuid/suid set, database binary($RDBMS_HOME/bin/oracle) has correct ownership and permission, and listener owner is able to access database oracle binary (as listener owner, "ls -l $RDBMS_HOME/bin/oracle" will tell) If its Job Role Separation environment, please refer to the following document: Oracle® Grid Infrastructure Oracle ASM Job Role Separation Option with SYSASM |
RAC升级后,一个节点无法连接数据库,报ORA-12537: TNS:connection closed的更多相关文章
- 启动监听报错:TNS-12537: TNS:connection closed TNS-12560: TNS:protocol adapter error TNS-00507: Connection closed Linux Error: 29: Illegal seek
启动监听程序报错: 说明:在rhel5.8上安装完成oracle11g数据库后,使用netca创建完监听,启动监听时报错.还未使用dbca创建实例. [oracle@rusky-oracle11g ~ ...
- Oracle 11gR2 RAC 数据库不能连接(ORA-12537: TNS:connection closed)的解决
Oracle 11gR2 RAC 数据库不能连接(ORA-12537: TNS:connection closed)的解决 [oracle@rac01 ~]$ sqlplus /nolog S ...
- Oracle 11gR2 RAC 数据库不能连接(ORA-12537: TNS:connection closed)
Oracle 11gR2 RAC 数据库不能连接(ORA-12537: TNS:connection closed)的解决 [oracle@rac01 ~]$ sqlplus /nolog SQL*P ...
- plsql 连接oralce数据库,报ora 12557 tns 协议适配器不可加载错误
使用plsql 连接oracle 数据库报ora 12557 错误: 解决方案: 1:首先确保服务中的service以及监听器都开启 2:F:\app\Administrator\product\11 ...
- Mac 升级后idea执行git命令报错xcrun: error: invalid active developer path的解决办法
报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun ...
- 关于MAC升级后,vim更新插件报错
找不到路径: 直接在终端 terminal 输入: xcode-select --install
- 监听报错 TNS-00525: Insufficient privilege for operation 11gR2 + 连接报错ORA-12537: TNS:connection closed
1.TNS-00525: Insufficient privilege for operation Started with pid= Listening on: (DESCRIPTION=(ADDR ...
- 单向链表在O(1)时间内删除一个节点
说删链表节点,第一时间想到就是遍历整个链表,找到删除节点的前驱,改变节点指向,删除节点,但是,这样删除单链表的某一节点,时间复杂度就是O(n),不符合要求: 时间复杂度是O(n)的做法就不说了,看看O ...
- rac 11g_第二个节点重启后无法启动实例:磁盘组dismount问题
原创作品,出自 "深蓝的blog" 博客,欢迎转载,转载时请务必注明以下出处,否则追究版权法律责任. 深蓝的blog:http://blog.csdn.net/huangyanlo ...
随机推荐
- Python paramiko安装报错
报错:CryptographyDeprecationWarning 代码引用: import paramiko client = paramiko.SSHClient() client.connect ...
- centos 6.5 忘记用户名和密码
1,启动虚拟机,出现下面的倒计时界面时,按键盘上的e键 (说明:要确保光标此时已经在虚拟机内了,要不然,按了e键,也是在windows内,无效.e代表edit,启动前编辑) 2,进入如下后界面,再按e ...
- Tensorflow中保存模型时生成的各种文件区别和作用
假如我们得到了如下的checkpoints, 上面的文件主要可以分成三类:一种是在保存模型时生成的文件,一种是我们在使用tensorboard时生成的文件,还有一种就是plugins这个文件夹,这个是 ...
- vue实现分页组件
创建pagination.vue /* * 所需参数 * total Number 总页数 * current Number 当前页面下标 * pageSize Number 页面显示条数 * siz ...
- MapReduce的核心运行机制
MapReduce的核心运行机制概述: 一个完整的 MapReduce 程序在分布式运行时有两类实例进程: 1.MRAppMaster:负责整个程序的过程调度及状态协调 2.Yarnchild:负责 ...
- js定时器关闭,js定时器停止,一次关闭所有正在运行的定时器,自定义函数clearIntervals()一次关闭所有正在运行的定时器
js定时器关闭,一次关闭所有正在运行的定时器,自定义函数clearIntervals()一次关闭所有正在运行的定时器,原理:利用数组存储定时器id,然后遍历数组,关闭定时器 附上页面的截图,代码在截图 ...
- vue cli4.0 配置环境变量
温馨提示:本文只适用于vue-cli 3.0 及以上的版本哦~ ------------------正文开始------------------ 开发项目时,经常会需要在不同环境中切换.那么我们如何配 ...
- 8259A的初始化(单片)
1.单片8259A的初始化流程图: 在单片的初始化中不需要ICW3,因为ICW3是指明主片和从片的连接情况的. 2.程序解析: (1)ICW1 MOV AL,13H (2)ICW2 MOV AL,08 ...
- C# 其它模拟延迟
System.Threading.Thread.Sleep(3000);//模拟延迟 如模拟上传图片等
- 字符串Hash学习笔记
[toc] # 以下内容作废,太多错误了,等我有时间重写 说一下什么是Hash,说白了就是把一大坨字符用一些神奇的数来表示,可以说是把字符加密了. 简单一点就是一个像函数一样的东西,你放进去一个值,它 ...