User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive
 

If you encounter TNS-12518: TNS:listener could not hand off client connection error, this article may help you.

Error messages


# Connect with sqlplus
[oracle]$ sqlplus system/orasystem12345@//oralab01:1521/UXODB

    SQL*Plus: Release 12.1.0.2.0 Production on Sat Oct 31 10:48:32 2015

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

    ERROR:
    ORA-12537: TNS:connection closed

# Check listener log for more detail
[oracle]$ vi $ORACLE_BASE/diag/tnslsnr/${HOSTNAME%%.*}/listener/trace/listener.log
    ...
    31-OCT-2015 10:48:32 * (CONNECT_DATA=(SERVICE_NAME=UXODB)(CID=(PROGRAM=sqlplus)(HOST=oralab01.uxora.com)(USER=grid))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.40)(PORT=47838)) * establish * UXODB * 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
    ...

Or from a jdbc connexion, you may have the following error message:

IO Error: Got minus one from a read call.

Solution

oracle executable may miss the suid sticky bit. It may have been removed because of a wrong command or a wrong script.
Set it back s follow:


# Check oracle executable binary
[oracle]$ ls -l $ORACLE_HOME/bin/oracle
    -rwxr-s--x. 1 oracle asmadmin 210720059 Oct 19 02:11 /u01/app/oracle/product/11.2.0/db_1/bin/oracle

# Set the sud sticky bit
[oracle]$ chmod 6751 $ORACLE_HOME/bin/oracle

# Check again oracle binary
[oracle]$ ls -l $ORACLE_HOME/bin/oracle
    -rwsr-s--x. 1 oracle asmadmin 210720059 Oct 19 02:11 /u01/app/oracle/product/11.2.0/db_1/bin/oracle

 

HTH.
Please leave comments and suggestions,
Michel.

Reference
What is SUID and how to set SUID in Linux/Unix? (linuxnix.com)

Enjoyed this article? Please like it or share it.

Add comment

Please connect with one of social login below (or fill up name and email)

     


Security code
Refresh

Comments   

Jim Otieno
# DBAJim Otieno 2017-12-18 16:07
A million thanks. This was more than helpful. It worked first time.
Reply | Reply with quote | Quote
Jamel FARISSI
# too goodJamel FARISSI 2016-08-30 15:57
hello,

just to say many many thanks.

Kind regards.
Reply | Reply with quote | Quote