6 Replies Latest reply on Feb 29, 2008 2:07 AM by Madrid

    ORA-12170 :TNS: connection timeout occured

    622391
      I could not connect database. whenever I am going to connect using sql*plus I am getting
      error ora-12170:TNS: connection timeout occured.
      I am using oracle database 10gr2.

      please help me..
      thanks
        • 1. Re: ORA-12170 :TNS: connection timeout occured
          Lutz Hartmann as sysdba
          Hi user619388,

          this is what oerr tells us about the error message:


          [oracle@rhas4 ~]$ oerr ora 12170
          12170, 00000, "TNS:Connect timeout occurred"
          // *Cause:  The server shut down because connection establishment or
          // communication with a client failed to complete within the allotted time
          // interval. This may be a result of network or system delays; or this may
          // indicate that a malicious client is trying to cause a Denial of Service
          // attack on the server.
          // *Action: If the error occurred because of a slow network or system,
          // reconfigure one or all of the parameters SQLNET.INBOUND_CONNECT_TIMEOUT,
          // SQLNET.SEND_TIMEOUT, SQLNET.RECV_TIMEOUT in sqlnet.ora to larger values.
          // If a malicious client is suspected, use the address in sqlnet.log to
          // identify the source and restrict access. Note that logged addresses may
          // not be reliable as they can be forged (e.g. in TCP/IP).

          Does it help?
          =;-)
          BR, Lutz
          • 2. Re: ORA-12170 :TNS: connection timeout occured
            625627
            Hi

            I have the same problem with my connection, i review this solution, but my server is running in a service on-demand and i don't have access to the server configuration.
            I I undertook tests Connection by port 22 to the same server host and was succesfull, but when i try to connect to database with the port 1521 appears the error message:

            ORA-12170 :TNS: connection timeout occured

            the support team in my company review the port 1521 and is opened.

            do you have any suggestion for solve this problem?

            Thanks in advance
            Carlos Rojas
            • 3. Re: ORA-12170 :TNS: connection timeout occured
              Lutz Hartmann as sysdba
              Hi,
              I need more info:
              1.)
              are you running RAC or is it single instance DB?
              2.)
              Which release are you using?

              BR,
              Lutz
              • 4. Re: ORA-12170 :TNS: connection timeout occured
                625627
                Hi

                Yes, the server is running on RAC and the release is 12

                Thanks in advance
                • 5. Re: ORA-12170 :TNS: connection timeout occured
                  Lutz Hartmann as sysdba
                  Hi,
                  well I cannot believe that you are using release 12 already.

                  ##################################################
                  If you are using NATed Firewall and RAC then here is some
                  info on 9.0.1 to 10.2 and RAC from metalink Note:453544.1:
                  ##################################################

                  Client -----------> NAT firewall ----------> RAC

                  The problem lies with the network design. Client can access RAC only via RAC's external IP address, because the connection goes via NAT firewall/router.

                  As part of RAC configuration, the connections may be re-directed among available nodes to have loadbalancing feature. RAC DB sends the internal IP/hostname in the redirected packet. When the client tries to connect using this internal IP address, it can not connect and thus errors out.

                  You will see the error if the redirection happends to other nodes. Connection will be successful if no redirection happends.

                  There are two possible solutions:

                  Solution 1:

                  1. set LOCAL_LISTENER on each node to the appropriate adaper:
                  node1
                  -----
                  local_listener='(address=(protocol=tcp)(host=node1)(port=1521))'

                  node2
                  -----
                  local_listener='(address=(protocol=tcp)(host=node2)(port=1521))'

                  2. confiure the clients properly:
                  RAC =
                  (DESCRIPTION =
                  (ADDRESS = (PROTOCOL = TCP)(HOST = node1)(PORT = 1521))
                  (ADDRESS = (PROTOCOL = TCP)(HOST = node2)(PORT = 1521))
                  (LOAD_BALANCE = yes)
                  (CONNECT_DATA =
                  (SERVER = DEDICATED)
                  (SERVICE_NAME = oracle)
                  (FAILOVER_MODE =
                  (TYPE = SELECT)
                  (METHOD = BASIC)
                  )
                  )
                  )


                  3. Make sure that the clients'
                  /etc/hosts file contains proper mapping:
                  Hostnames 'node1' and 'node2' should be mapped to its External NATed IP addresses.

                  Solution 2:
                  Use CMAN in between NATing firewall and your RAC DB. This will avoid the redirection packet sent back to the client.

                  Hope it helps,
                  =;-)
                  • 6. Re: ORA-12170 :TNS: connection timeout occured
                    Madrid
                    I could not connect database. whenever I am going to
                    connect using sql*plus I am getting
                    error ora-12170:TNS: connection timeout occured.
                    I am using oracle database 10gr2.

                    please help me..
                    thanks
                    Your connection is timing out. Check if your destination host is reachable. It has happened to me sometimes that if the ping to the server times out, then this error is shown as a time out in tns connections. Please verify your network configuration.


                    ~ Madrid

                    http://hrivera99.blogspot.com/