TNS-12518

TNS-12518 Can Not Connect To RAC 11gR2 Database [ID 1088754.1]

Applies to:

Oracle Server - Enterprise Edition - Version: 11.2.0.1 and later   [Release: 11.2 and later ]
Information in this document applies to any platform.

Symptoms

Just installed and configured 11gR2 Grid Infrastructure and database, sqlplus can not connect to the new 11.2 database using SCAN connection.

$ sqlplus test/*******@rac-scan:2010/dbrac

SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 24 17:40:48 2010

Copyright (c) 1982, 2009, Oracle. All rights reserved.

ERROR:
ORA-12537: TNS:connection closed

Enter user-name:


From the listener.log:
24-MAR-2010 17:40:51 * (CONNECT_DATA=(SERVICE_NAME=dbrac)(CID=(PROGRAM=sqlplus)(HOST=racdb02)(USER=oracle))(SERVER=dedicated)(INSTANCE_NAME=t1rac2)) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.40.20.40)(PORT=13788)) * establish * dbrac * 12518
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

Changes

New installation.

Cause

This is caused by the oracle executable not having the setuid bit on:
$ ls -l $ORACLE_HOME/bin/oracle
-rwxrwxr-x 1 oracle dba 210824648 Mar 29 12:33 /orabin/app/oracle/product/112_dbrac/server/db_1/bin/oracle*

ORACLE_HOME resides on a NFS mounted file system (NetApps Filer) in this case and the filer export option for this NFS file system has "nosuid" (nosetuid) set which is wrong:

/vol/t1rac -sec=sys,rw=racdb01:racdb02,root=10.40.20.10:racdb01:racdb02,nosuid


This prevented the setuid bit (chmod 6751) from being set for the oracle executable.

Solution

1. Fix the export option on the NFS file system server, remove "nosuid" option:

/vol/t1rac -sec=sys,rw=racdb01:racdb02,root=10.40.20.10:racdb01:racdb02

2. Relink oracle, so that oracle executable has rwsr-s--x permission set.

cd $ORACLE_HOME/bin
relink all

After that user can connect to database.

Note. In some cases, please also check the setuid bit for Grid Infrastructure $ORACLE_HOME/bin/oracle binary, this is used by the ASM instance. Without the setuid bit, database will fail to connect to ASM instance with same error and database will not be able to start.

CRS will report:
CRS-5011: Check of resource "+ASM" failed

Start database will get:
$ ./srvctl start database -d sirac

PRCR-1079 : Failed to start resource ora.sirac.db
ORA-01078: failure in processing system parameters
CRS-2674: Start of 'ora.sirac.db' on 'srv111' failed
CRS-2632: There are no more servers to try to place resource 'ora.sirac.db' on that would satisfy its placement policy
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0

alert log shows:
TNS-12547: TNS:lost contact
ns secondary err code: 12560
nt main err code: 517

TNS-00517: Lost contact
nt secondary err code: 32
nt OS err code: 0
ERROR: Failed to connect with connect string: (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u01/app/grid/product/11.2.0/grid/bin/oracle)(ARGV0=oracle+ASM1_user32138_sirac1)(ENVS='ORACLE_HOME=/u01/app/grid/product/11.2.0/grid,ORACLE_SID=+ASM1')(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(enable=setuser))

chmod 6751  $GRID_HOME/bin/oracle will fix the issue.

No comments:

SHRD0014: GLLEZL - process exiting with failure

  SYMPTOMS Journal Import completes with the following error: Error ------ ORA-01653 : unable to extend table GL.GL_IMPORT_REFERENCES ORA-01...