DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: TNS-12518: TNS:listener could not hand off client connection

Hybrid View

  1. #1
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092

    Question

    I am trying to setup a 9.0.1.3 listener to service both 9.0.1.3 and 8.1.7.3 databases on Solaris 2.8. Regular dedicated connections and OCI Java connections work without a problem. JDBC Thin connections fail with an error of:
    Code:
    Exception in thread "main" java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(ERR=12518)(VSNNUM=150999808)(ERROR_STACK=(ERROR=(CODE=12518)(EMFI=4))(ERROR=(CODE=12560)(EMFI=4))))
            at oracle.jdbc.dbaccess.DBError.throwSqlException(Compiled Code)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(Compiled Code)
            at oracle.jdbc.dbaccess.DBError.throwSqlException(Compiled Code)
            at oracle.jdbc.driver.OracleConnection.(Compiled Code)
            at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled Code)
            at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
            at java.sql.DriverManager.getConnection(Compiled Code)
            at java.sql.DriverManager.getConnection(Compiled Code)
            at thintest.main(Compiled Code)
    In the listener.log, I get the following error:
    Code:
    TNS-12518: TNS:listener could not hand off client connection
     TNS-12560: TNS:protocol adapter error
    My listener.ora entry looks like:
    Code:
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
          )
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = oradev1)(PORT = 1521))
          )
        )
      )
    
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /oracle/app/oracle/product/817)
          (PROGRAM = extproc)
        )
        (SID_DESC =
          (GLOBAL_DBNAME = ibdev1.us)
          (ORACLE_HOME = /oracle/app/oracle/product/817)
          (SID_NAME = ibdev1)
        )
      )
    And I'm trying to connect with:
    Code:
        Connection conn =
          DriverManager.getConnection ("jdbc:oracle:thin:@oradev1:1521:ibdev1", "myuser", "mypass");
    Anybody have any ideas?
    Jeff Hunter

  2. #2
    Join Date
    Aug 2001
    Posts
    75
    Check whether your listener is running by using lsnrctl status command and When using JDBC connection, are you setting ORACLE_HOME, LD_LIBRARY_PATH correctly.
    Which version of JDBC thin driver you are using ?
    Also check your CLASSPATH
    If you are using JDK version 1.2 or above
    ORACLE_HOME=YourHome
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    CLASSPATH=$ORACLE_HOME/jdbc/lib/classes12.zip
    export ORACLE_HOME LD_LIBRARY_PATH CLASSPATH

    If you are using JDK version 1.1 or so then CLASSPATH should be
    CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip



    Sanjay

    [Edited by sanjay92 on 05-16-2002 at 04:13 PM]
    OCP 8i

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Yes, my listener is running. I can get OCI JDBC calls through just fine.

    My environment variables are setup correctly.

    I am using the correct classes12.zip in my $CLASSPATH.
    Jeff Hunter

  4. #4
    Join Date
    Aug 2001
    Posts
    75
    Please try this

    check that "DIRECT_HANDOFF_TTC_listener_name" is set to ON in the listener.ora on the server node. Where listener name is the name of your listener. Please restart the listener if you end u changing this or any parameter in the listener.ora file.

    Question : Are you using MTS ?
    Sanjay


    [Edited by sanjay92 on 05-16-2002 at 04:56 PM]
    OCP 8i

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Fails if DIRECT_HANDOFF_TTC is on or off. Yes, I am using MTS.
    Jeff Hunter

  6. #6
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    I have also tried setting (ENVS='LD_LIBRARY_PATH=/oracle/app/oracle/product/817/lib') in the listener.ora file with no luck.
    Jeff Hunter

  7. #7
    Join Date
    Aug 2001
    Posts
    75
    If this is your test system, could you try not to use MTS and then test the whole thing.

    Can yo
    also post your listener.ora
    Thanks
    Sanjay

    Originally posted by marist89
    I have also tried setting (ENVS='LD_LIBRARY_PATH=/oracle/app/oracle/product/817/lib') in the listener.ora file with no luck.
    OCP 8i

  8. #8
    Join Date
    May 2002
    Posts
    15
    at first
    did you fail both with oracle oracle 8i and 9i?
    what is the version of listener when it server both 8i and 9i?
    what is your jdbc driver used when you use jdbc connection?
    Just wanna get more and more professional with oracle
    Just wanna a job relateed with oracle

  9. #9
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    New information: Through trial and error, I have found that the 901 listener will accept connections for a while and then refuse connections with this error. The only resolution I have found is to bounce/reload the listener.
    Jeff Hunter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width