Forum Stats

  • 3,839,356 Users
  • 2,262,486 Discussions
  • 7,900,947 Comments

Discussions

LISTENER: TNS-12545 ... No such file or directory

Przemek P
Przemek P Member Posts: 63
edited Oct 10, 2011 3:41AM in General Database Discussions
Hi. I have a 11.2.0 database. This database was migrated from 10.2.0.4 recently. We are now testing if this test migration is ok.

At the beginning noone had problem with connection but after a while I couldn't connect via sql developer, or make any remote connection. No new connections are allowed. How can i deal with it ?

Sql developer throws this error:

Got minus one from a read call
Vendor code 17002

Listener throws this erro (sorry for xml format)r:

<msg time='2011-10-06T14:04:43.440+02:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='fake_database'
host_addr='10.50.150.58'>
<txt>06-OCT-2011 14:04:43 * (CONNECT_DATA=(SID=SPBUFOR)(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=wrpiprtr01))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.2.3.97)(PORT=56011)) * establish * SPBUFOR * 12518
</txt>
</msg>
<msg time='2011-10-06T14:04:43.441+02:00' org_id='oracle' comp_id='tnslsnr'
type='UNKNOWN' level='16' host_id='fake_database'
host_addr='10.50.150.58'>
<txt>TNS-12518: TNS:listener could not hand off client connection
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
Linux Error: 2: No such file or directory
4268634

Best Answer

  • sb92075
    sb92075 Member Posts: 42,196 Blue Diamond
    Answer ✓
    Przemek P wrote:
    ping is OK
    tnsping is OK

    VAR/LOG/MESSAGES:

    Oct 6 15:42:40 fake_database setroubleshoot: SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 which requires text relocation. For complete SELinux messages. run sealert -l ab5e2363-dc78-4e04-86f3-f4e7a3005ff8
    so fix OS configuration so error no longer occurs

    Oracle is victim; not culprit.

Answers

  • imran khan
    imran khan Member Posts: 772
    please try the following steps :

    1. Make sure that tnslsnr file exist in your $ORACLE_HOME/bin
    2. configure the listener.ora and tnsnames.ora file using the Network Configuration Assistant (netca).
    3. Then try restarting the listener.
    4. Then make sure that the network is up, by pinging.
    5. Then try the tnsping
    6. Then try connecting.


    HTH,

    imran khan
    4268634
  • CKPT
    CKPT Member Posts: 9,955 Silver Crown
    <txt>TNS-12518: TNS:listener could not hand off client connection
    TNS-12545: Connect failed because target host or object does not exist
    TNS-12560: TNS:protocol adapter error
    TNS-00515: Connect failed because target host or object does not exist
    Linux Error: 2: No such file or directory
    check the hostname is correct or not? is it pinging or not

    post

    lsnrctl status
    lsnrctl services
    tnsping <tns>
    ping <hostname>
  • sb92075
    sb92075 Member Posts: 42,196 Blue Diamond
    Przemek P wrote:
    Hi. I have a 11.2.0 database. This database was migrated from 10.2.0.4 recently. We are now testing if this test migration is ok.

    At the beginning noone had problem with connection but after a while I couldn't connect via sql developer, or make any remote connection. No new connections are allowed. How can i deal with it ?

    Sql developer throws this error:

    Got minus one from a read call
    Vendor code 17002

    Listener throws this erro (sorry for xml format)r:

    <msg time='2011-10-06T14:04:43.440+02:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='fake_database'
    host_addr='10.50.150.58'>
    <txt>06-OCT-2011 14:04:43 * (CONNECT_DATA=(SID=SPBUFOR)(CID=(PROGRAM=SQL Developer)(HOST=__jdbc__)(USER=wrpiprtr01))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.2.3.97)(PORT=56011)) * establish * SPBUFOR * 12518
    </txt>
    </msg>
    <msg time='2011-10-06T14:04:43.441+02:00' org_id='oracle' comp_id='tnslsnr'
    type='UNKNOWN' level='16' host_id='fake_database'
    host_addr='10.50.150.58'>
    <txt>TNS-12518: TNS:listener could not hand off client connection
    TNS-12545: Connect failed because target host or object does not exist
    TNS-12560: TNS:protocol adapter error
    TNS-00515: Connect failed because target host or object does not exist
    Linux Error: 2: No such file or directory
    some unknown Operating System (OS) failure occured

    what clues exist within OS messages file?
    sb92075
  • Przemek P
    Przemek P Member Posts: 63
    ping is OK
    tnsping is OK

    VAR/LOG/MESSAGES:

    Oct 6 15:42:40 fake_database setroubleshoot: SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 which requires text relocation. For complete SELinux messages. run sealert -l ab5e2363-dc78-4e04-86f3-f4e7a3005ff8
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4131
    Oct 6 15:43:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:4131
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4133
    Oct 6 15:43:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:4133
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4133
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4134
    Oct 6 15:43:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:4134
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1174
    Oct 6 15:48:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:1174
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1175
    Oct 6 15:48:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:1175
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1175
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1176
    Oct 6 15:48:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:1176
    Oct 6 15:48:40 fake_database setroubleshoot: SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 which requires text relocation. For complete SELinux messages. run sealert -l ab5e2363-dc78-4e04-86f3-f4e7a3005ff8
  • sb92075
    sb92075 Member Posts: 42,196 Blue Diamond
    Answer ✓
    Przemek P wrote:
    ping is OK
    tnsping is OK

    VAR/LOG/MESSAGES:

    Oct 6 15:42:40 fake_database setroubleshoot: SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 which requires text relocation. For complete SELinux messages. run sealert -l ab5e2363-dc78-4e04-86f3-f4e7a3005ff8
    so fix OS configuration so error no longer occurs

    Oracle is victim; not culprit.
  • oradba
    oradba Member Posts: 10,214
    You have to allow text relocation, I only know command 'chcon' does this, I don't know the details. Since that seems to be a generic requirement for Oracle on SELinux, I hope the installation guide covers this.
    oradba
  • EdStevens
    EdStevens Member Posts: 28,778 Gold Crown
    edited Oct 6, 2011 10:46AM
    Przemek P wrote:
    ping is OK
    tnsping is OK

    VAR/LOG/MESSAGES:

    Oct 6 15:42:40 fake_database setroubleshoot: SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 which requires text relocation. For complete SELinux messages. run sealert -l ab5e2363-dc78-4e04-86f3-f4e7a3005ff8
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4131
    Oct 6 15:43:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:4131
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4133
    Oct 6 15:43:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:4133
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4133
    Oct 6 15:43:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:4134
    Oct 6 15:43:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:4134
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1174
    Oct 6 15:48:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:1174
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1175
    Oct 6 15:48:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:1175
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1175
    Oct 6 15:48:20 fake_database snmpd[5944]: Connection from UDP: [10.1.36.10]:1176
    Oct 6 15:48:20 fake_database snmpd[5944]: Received SNMP packet(s) from UDP: [10.1.36.10]:1176
    Oct 6 15:48:40 fake_database setroubleshoot: SELinux is preventing lsnrctl from loading /u01/app/oracle/product/11.2.0/grid/lib/libclntsh.so.11.1 which requires text relocation. For complete SELinux messages. run sealert -l ab5e2363-dc78-4e04-86f3-f4e7a3005ff8
    I don't have the documentation at hand, but I've set up a lot oracle linux machines for my personal test lab, and remember seeing that SELlinux should be disabled, as it does not play well with Oracle.

    I googled oracle+selinux and got lots of blog traffic. Currently having an issue with tahiti, so can't check installation guides.

    Edited by: EdStevens on Oct 6, 2011 9:46 AM
  • Przemek P
    Przemek P Member Posts: 63
    sorry, SELinux was has been working in PERMISSIVE mode, so that messages in /var/messages are not dangerous,

    I thought my problem was resolved, becouse suddenly I could connect to a database, but today my sysadmin told me that SELinux was in permissive mode and that it has no influence on my problem...

    Where else to search ?
This discussion has been closed.