oracle文件属性导致的ORA-12547故障

环境是oracle 11.2.0.4 RAC.发现一个节点连接数据库的时候报错ora-12547
[oracle@gsxtrac01 ~]$ oerr ora 12547
12547, 00000, "TNS:lost contact"
// *Cause: Partner has unexpectedly gone away, usually during process
// startup.
// *Action: Investigate partner application for abnormal termination. On an
// Interchange, this can happen if the machine is overloaded.
查看集群状态正常,监听状态正常,本地连接正常,监听没有日志,无从下手,在mos上找到了如下解答,是因为的oracle的可执行权限不对导致,oracle可执行文件的属性应该是:
[oracle@gsxtrac01 ~]$ ls -l /u02/app/oracle/product/11.2.0/bin/oracle
-rwsr-s--x 1 oracle asmadmin 239768932 Dec  4  2014 /u02/app/oracle/product/11.2.0/bin/oracle
[oracle@gsxtrac01 ~]$ 
而出故障的时候oracle的setuid属性没有了,使用chmod u+s oracle解决

具体如下:

转到底部转到底部

In this Document

Symptoms
 Changes
 Cause
 Solution
 References


APPLIES TO:

Oracle Database Configuration Assistant - Version 11.1.0.7 to 12.1.0.1 [Release 11.1 to 12.1]
Oracle Database - Enterprise Edition - Version 11.2.0.3 to 12.1.0.2 [Release 11.2 to 12.1]
Oracle Net Services - Version 11.2.0.4 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.

SYMPTOMS

In 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.

  • Error detail
12537, 00000, "TNS:connection closed"
// *Cause: "End of file" condition has been reached; partner has disconnected.
// *Action: None needed; this is an information message.

Before the error is reported, connection could hang for a while, and a core file may also be generated.
  • Screen output:
SQL> conn system/xxx@OSES
ERROR:
ORA-12537: TNS:connection closed

OR

PRCR-1079 : Failed to start resource ora.db11.db
CRS-5011: Check of resource db11 failed: details at ..
CRS-2674: Start of ora.db11.db on racnode1 failed
ORA-12546: TNS:permission denied
  • listener_scann.log or listener.log
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

OR

TNS-12518: TNS:listener could not hand off client connection
TNS-12547: TNS:lost contact
 TNS-12560: TNS:protocol adapter error
  TNS-00517: Lost contact
   Linux Error: 32: Broken pipe
  • runInstaller error if installing
INFO: Starting Output Reader Threads for process /ocw/grid/bin/kfod
INFO: Parsing KFOD-00300: OCI error [-1] [OCI error] [ORA-12547: TNS:lost contact
INFO: Parsing ] [12547]
INFO: Parsing
INFO: The process /ocw/grid/bin/kfod exited with code 1
..
SEVERE: [FATAL] [INS-30502] No ASM disk group found.
   CAUSE: There were no disk groups managed by the ASM instance +ASM1.


CHANGES

 This is likely a new installation.  This problem occurs often on systems where GRID control and database home reside together.

CAUSE


1. 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. Another cause may be permissions on the RDBMS Directory structure or Home directory which needs to be accessed by the CRS user.
Check that the RDBMS $ORACLE_HOME is set to 755.
This can be seen from an OS trace such as strace or truss when using it to trace the CRS user running the "oracle" executable which fails with the "Permission denied" error.

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>

 



SOLUTION

Solution 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 
Installation Guide
11g Release 2 (11.2)

Oracle ASM Job Role Separation Option with SYSASM

REFERENCES

NOTE:975457.1 - How to Troubleshoot Connectivity Issue with 11gR2 SCAN Name
NOTE:422173.1 - Local SQL*Plus Connection and DBCA Fails With: ORA-12547: TNS:Lost Contact 
NOTE:970619.1 - ORA-12545 or ORA-12537 While Connecting to RAC through SCAN name
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值