Error ora 12170

ORA-12170 mean that the failed connections did not reach the listener due to network problem. Most likely, they're blocked by security rules.

At some points, the client sides received intermittent ORA-12170 repeatedly:

ORA-12170: TNS:Connect timeout occurred

Meanwhile, the server side did not receive any errors either in listener.log or alert.log.

ORA-12170 mean that the failed connections did not reach the listener due to network problem. Most likely, they’re blocked by security rules.

Sometimes, there’s a time-out, but what would cause the network time out? What factors that blocked the packets of clients in the pathway to database. Here I made a list for the possibilities of ORA-12170:

  • TNS Names
    • Wrong IP address in TNS entry, which cannot be reachable in your local area network. There maybe a duplicate entry in your tnsnames.ora.
    • Wrong port in TNS entry, which denies all connections by firewall.
  • Hardware or software firewall
  • Poor quality of network
  • Network card interface (NIC) failure
  • Anti-Virus software
    • Detected suspicious packets and blocked them.
    • Was scanning the whole operating system.
  • Intrusion Prevention System (IPS)
  • Intrusion Detection System (IDS)
  • Proxy Server

Solutions

The first step, you need to make sure everything you provided is correct like I said earlier, which includes checking tnsnames.ora.

The most common mistake is that you didn’t open the port 1521 on firewall. That caused ORA-12170. To open port on firewall of the database server, you may refer to these posts:

  • On Linux:
  • How to Open Ports and Survives from Reboots

  • On Windows:
  • How to Open Port on Windows Server

If the firewall is on network appliance, you should ask your network administrator for help.

In our case, we found an IPS applied new rules recently that could caused the problem eventually. To revert the configuration, we rolled back the policy of that IPS. No more ORA-12170.

Other Factors

By the way, if the network appliance really needs more considerable time to complete the validation, you can raise the inbound connect time value of the listener, which is also the solution to ORA-03136 Inbound Connection Timed Out.

Such cases of ORA-12170 happened on the client sides. The management usually misunderstood as a database problem, and ask DBA for resolving it. But the database was healthy during incidents, this reminds us that not all ORA errors are thrown by the database.

Содержание

  1. ORA-12170/TNS-12535 Timeout Errors while attempting to Connect To Remote Database Using SQL*Plus or Any other tool. (Doc ID 1392646.1)
  2. Applies to:
  3. Symptoms
  4. Changes
  5. Cause
  6. To view full details, sign in with your My Oracle Support account.
  7. Don’t have a My Oracle Support account? Click to get started!
  8. Error ora 12170 tns connect timeout
  9. How to Resolve ORA-12170: TNS:Connect timeout occurred
  10. ORA-12170
  11. Solutions
  12. Other Factors
  13. Error ora 12170 tns connect timeout
  14. Несколько основных причин ошибки и способы их решения
  15. ORA-12170: TNS:Connect timeout occurred
  16. 9 Answers 9

ORA-12170/TNS-12535 Timeout Errors while attempting to Connect To Remote Database Using SQL*Plus or Any other tool. (Doc ID 1392646.1)

Last updated on AUGUST 02, 2021

Applies to:

Symptoms

SQLPLUS and TNSPING command fails with the TNS-12535 error:

Verified the issue by the client sqlnet.log and trace file Oracle Net Client trace file, ‘sqlnet_3640_1.trc’

1. Client sqlnet.log

Fatal NI connect error 12170.

VERSION INFORMATION:
TNS for 32-bit Windows: Version 10.2.0.1.0 — Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 — Production
Time: 05-JAN-2012 12:56:25
Tracing to file: C:oracleproduct10.2.0client_1NETWORKtracesqlnet_3640_1.trc
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 60
nt OS err code: 0
Client address:

2. Client sqlnet trace (sqlnet_3640_1.trc)

If try SQLPLUS and TNSPING from the database server using listener it works fine.

Changes

No changes, This is a new installation of 11.2.

Cause

To view full details, sign in with your My Oracle Support account.

Don’t have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.

Oracle offers a comprehensive and fully integrated stack of cloud applications and platform services. For more information about Oracle (NYSE:ORCL), visit oracle.com. пїЅ Oracle | Contact and Chat | Support | Communities | Connect with us | | | | Legal Notices | Terms of Use

Источник

Error ora 12170 tns connect timeout

Error ORA-12170: “TNS: Connect Timeout Occurred”

There are several possible causes for error ORA-12170. They include: problems with the firewall, when the database is down, when the listener is down, if the sqlnet.ora parm is invalid, among other possible causes.

To fix the error, the user should consider all possible causes and their corresponding solutions on how to get rid of the error. The solution to error ORA-12170 will emerge through process of elimination.

Check to make sure there is no firewall in place between the client and server. If there is, disable the firewall and try again

If the error occurred because there was a delay in the system or network, turn on tracing to determine exactly where clients are timing out.

It may be the case that the Oracle service is running on an IP address while the host is configured to another IP address. To determine the IP address of the Oracle service, issue an lsnrctl status command. Check the address that is reported. To determine the IP address of the host, issue an ipconfig or ifconfig. This is dependent on your operation system; use ipconfig for Windows OS and ifconfig for Linux. To avoid seeing error ORA-12170, use a static IP address rather than a DHCP for assigning an IP address of the host.

In one case, the server may have shut down because the connection establishment or communication with a client did not complete in an allotted time interval. This is probably due to delays within the system or the network, or it may possibly be a client that is trying to maliciously attack by causing a Denial of Service attack on the server.

If the error is occurring because of a slow network or system, you may fix the error by reconfiguring the following parameters in sqlnet.ora to larger values:

SQLNET.INBOUND_CONNECT_TIMEOUT, SQLNET.SEND_TIMEOUT, SQLNET.RECV_TIMEOUT

If the error is occurring due to a malicious attack via a Denial of Service attack, you may use the sqlnet.log to identify the source of attack and restrict the attacker’s access. However, users should be aware that logged addresses might not be entirely reliable. To find your sqlnet.ora file, go to your $ORACLE_HOME/network/admin directory. If the timeout occurs before the IP address can be retrieved by the database server, enable listener tracing to determine the client who made the request.

If you continue to experience problems, contact your business objects administrator or database administrator with the error message information.

Источник

How to Resolve ORA-12170: TNS:Connect timeout occurred

ORA-12170

At some points, the client sides received intermittent ORA-12170 repeatedly:

ORA-12170: TNS:Connect timeout occurred

Meanwhile, the server side did not receive any errors either in listener.log or alert.log .

ORA-12170 mean that the failed connections did not reach the listener due to network problem. Most likely, they’re blocked by security rules.

Sometimes, there’s a time-out, but what would cause the network time out? What factors that blocked the packets of clients in the pathway to database. Here I made a list for the possibilities of ORA-12170:

  • TNS Names
    • Wrong IP address in TNS entry, which cannot be reachable in your local area network. There maybe a duplicate entry in your tnsnames.ora .
    • Wrong port in TNS entry, which denies all connections by firewall.
  • Hardware or software firewall
  • Poor quality of network
  • Network card interface (NIC) failure
  • Anti-Virus software
    • Detected suspicious packets and blocked them.
    • Was scanning the whole operating system.
  • Intrusion Prevention System (IPS)
  • Intrusion Detection System (IDS)
  • Proxy Server

Solutions

The first step, you need to make sure everything you provided is correct like I said earlier, which includes checking tnsnames.ora .

The most common mistake is that you didn’t open the port 1521 on firewall. That caused ORA-12170. To open port on firewall of the database server, you may refer to these posts:

    On Linux:

If the firewall is on network appliance, you should ask your network administrator for help.

In our case, we found an IPS applied new rules recently that could caused the problem eventually. To revert the configuration, we rolled back the policy of that IPS. No more ORA-12170.

Other Factors

By the way, if the network appliance really needs more considerable time to complete the validation, you can raise the inbound connect time value of the listener, which is also the solution to ORA-03136 Inbound Connection Timed Out.

Such cases of ORA-12170 happened on the client sides. The management usually misunderstood as a database problem, and ask DBA for resolving it. But the database was healthy during incidents, this reminds us that not all ORA errors are thrown by the database.

Источник

Error ora 12170 tns connect timeout

Пользователи не могут подключиться к базе. Обычно при этом они получают ошибки: ORA-12547: TNS:lost contact или ORA-12637: Packet receive failed.

В sqlnet.log на сервере сообщения об ошибке ORA-12170: TNS:Connect timeout. Еще для версий 10g и выше, в alert.log могут быть сообщения WARNING: inbound connection timed out (ORA-3136).

VERSION INFORMATION:
TNS for 64-bit Windows: Version 10.2.0.4.0 — Production
Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 10.2.0.4.0 — Production
Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 10.2.0.4.0 — Production
Time: 13-FEB-2013 13:47:12
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 60
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.77.116.47)(PORT=2971))
***********************************************************************

Для разных ОС, параметр ‘nt secondary err code‘ может быть разным

For the Solaris system: nt secondary err code: 145:
ETIMEDOUT 145 /* Connection timed out */
For the Linux operating system: nt secondary err code: 110
ETIMEDOUT 110 Connection timed out
For the HP-UX system: nt secondary err code: 238:
ETIMEDOUT 238 /* Connection timed out */
For AIX: nt secondary err code: 78:
ETIMEDOUT 78 /* Connection timed out */
For Windows based platforms: nt secondary err code: 60 (which translates to Winsock Error: 10060)

Выдержка из документации

ORA-12170: 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).

Смысл этой ошибки в том что соединение не может быть установлено в течение отведенного интервала времени. А вот причин по которым это происходит может быть великое множество.

Как видно, основная рекомендация — увеличить параметры SQLNET.INBOUND_CONNECT_TIMEOUT, SQLNET.SEND_TIMEOUT и SQLNET.RECV_TIMEOUT. Можно попробовать сделать это, но это может не помочь. Поэтому лучше попробовать разобраться в корне проблемы.

Несколько основных причин ошибки и способы их решения

1) Серверные ресурсы перегружены.

Проверить насколько загружен сервер (процессор, диски, сеть). Выявить причину утечки ресурсов и устранить её. Большая загрузка сети может косвенно указывать на DoS. Если вы обнаружили высокую нагрузку сервера, но она оказалась полезной — то это указывает на нехватку мощности сервера и пора задуматься об его обновлении или замене.
©Bobrovsky Dmitry
2) Проблемы сети.
©Bobrovsky Dmitry
Если есть возможность проверить сетевой канал от клиента до сервера с помощью специализированых аппаратных или программных средств. Если нет, то можно запуститесь ping на некоторое время и посмотреть, какое время отклика и нет ли потерь пакетов.

3) База данных и Listener не функционируют.

Проверить что сама база данных и Listener запущены и работают нормально, что к ним можно подключиться локально или с других компьютеров сети.
Dmitry Bobrovsky
4) Проблемы из-за антивируса или firewall.
Dmitry Bobrovsky
Отключить или даже полностью деинсталировать антивирус или firewall.

5) Проблемы с DNS.

Либо прописать соответствующие записи в файл host либо во всех конфигурационных файлах oracle net использовать вместо имен — ip-адреса.
Запись fatal ni connect error 12170 ns main err code 12535 впервые появилась Dmitry Bobrovsky Blog

Источник

ORA-12170: TNS:Connect timeout occurred

I was trying to connect to the database here in my laptop using Oracle Toad but I kept on having this error:

ORA-12170: TNS:Connect timeout occurred

What are the possible reasons why I kept on having this error?

I accessed the same database yesterday and was able to accessed it.

9 Answers 9

[Gathering the answers in the comments]

The problem is that the Oracle service is running on a IP address, and the host is configured with another IP address.

To see the IP address of the Oracle service, issue an lsnrctl status command and check the address reported (in this case is 127.0.0.1, the localhost):

To see the host IP address, issue the ipconfig (under windows) or ifconfig (under linux) command.

Howewer, in my installation, the Oracle service does not work if set on localhost address, I must set the real host IP address (for example 192.168.10.X).

To avoid this problem in the future, do not use DHCP for assigning an IP address of the host, but use a static one.

It is because of conflicting SID. For example, in your Oracle12cBaseappproduct12.1.0dbhome_1NETWORKADMINtnsnames.ora file, connection description for ORCL is this:

And, you are trying to connect using the connection string using same SID but different IP, username/password, like this:

To resolve this, make changes in the tnsnames.ora file:

Check the FIREWALL, to allow the connection at the server from your client. By allowing Domain network or create rule.

Issue 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.

TROUBLESHOOTING STEPS (Doc ID 730066.1)

Connection Timeout errors ORA-3135 and ORA-3136 A connection timeout error can be issued when an attempt to connect to the database does not complete its connection and authentication phases within the time period allowed by the following: SQLNET.INBOUND_CONNECT_TIMEOUT and/or INBOUND_CONNECT_TIMEOUT_ server-side parameters.

Starting with Oracle 10.2, the default for these parameters is 60 seconds where in previous releases it was 0, meaning no timeout.

On a timeout, the client program will receive the ORA-3135 (or possibly TNS-3135) error:

ORA-3135 connection lost contact

and the database will log the ORA-3136 error in its alert.log:

. Sat May 10 02:21:38 2008 WARNING: inbound connection timed out (ORA-3136) .

  • Authentication SQL

When a database session is in the authentication phase, it will issue a sequence of SQL statements. The authentication is not complete until all these are parsed, executed, fetched completely. Some of the SQL statements in this list e.g. on 10.2 are:

NOTE: The list of SQL above is not complete and does not represent the ordering of the authentication SQL . Differences may also exist from release to release.

  • Hangs during Authentication

The above SQL statements need to be Parsed, Executed and Fetched as happens for all SQL inside an Oracle Database. It follows that any problem encountered during these phases which appears as a hang or severe slow performance may result in a timeout.

Symptoms of such hangs will be seen by the authenticating session as waits for: • cursor: pin S wait on X • latch: row cache objects • row cache lock Other types of wait events are possible; this list may not be complete.

The issue here is that the authenticating session is blocked waiting to get a shared resource which is held by another session inside the database. That blocker session is itself occupied in a long-running activity (or its own hang) which prevents it from releasing the shared resource needed by the authenticating session in a timely fashion. This results in the timeout being eventually reported to the authenticating session.

  • Troubleshooting of Authentication hangs

In such situations, we need to find out the blocker process holding the shared resource needed by the authenticating session in order to see what is happening to it.

Typical diagnostics used in such cases are the following:

  1. Three consecutive systemstate dumps at level 266 during the time that one or more authenticating sessions are blocked. It is likely that the blocking session will have caused timeouts to more than one connection attempt. Hence, systemstate dumps can be useful even when the time needed to generate them exceeds the period of a single timeout e.g. 60 sec:
  • ASH reports covering e.g. 10-15 minutes of a time period during which several timeout errors were seen.
  • If possible, Two consecutive queries on V$LATCHHOLDER view for the case where the shared resource being waited for is a latch. select * from v$latchholder; The systemstate dumps should help in identifying the blocker session. Level 266 will show us in what code it is executing which may help in locating any existing bug as the root cause.

Examples of issues which can result in Authentication hangs

    Unpublished Bug 6879763 shared pool simulator bug fixed by patch for unpublished Bug 6966286 see Note 563149.1

Unpublished Bug 7039896 workaround parameter _enable_shared_pool_durations=false see Note 7039896.8

Other approaches to avoid the problem

Источник

Пользователи не могут подключиться к базе. Обычно при этом они получают ошибки: ORA-12547: TNS:lost contact или ORA-12637: Packet receive failed.

В sqlnet.log на сервере сообщения об ошибке ORA-12170: TNS:Connect timeout. Еще для версий 10g и выше, в alert.log могут быть сообщения WARNING: inbound connection timed out (ORA-3136).


***********************************************************************
Fatal NI connect error 12170.

VERSION INFORMATION:
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 10.2.0.4.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 10.2.0.4.0 - Production
Time: 13-FEB-2013 13:47:12
Tracing not turned on.
Tns error struct:
ns main err code: 12535
TNS-12535: TNS:operation timed out
ns secondary err code: 12560
nt main err code: 505
TNS-00505: Operation timed out
nt secondary err code: 60
nt OS err code: 0
Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.77.116.47)(PORT=2971))
***********************************************************************

Для разных ОС, параметр ‘nt secondary err code‘ может быть разным

For the Solaris system: nt secondary err code: 145:
ETIMEDOUT 145 /* Connection timed out */
For the Linux operating system: nt secondary err code: 110
ETIMEDOUT 110 Connection timed out
For the HP-UX system: nt secondary err code: 238:
ETIMEDOUT 238 /* Connection timed out */
For AIX: nt secondary err code: 78:
ETIMEDOUT 78 /* Connection timed out */
For Windows based platforms: nt secondary err code: 60 (which translates to Winsock Error: 10060)

Выдержка из документации

ORA-12170: 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).

———————————————————————————

Смысл этой ошибки в том что соединение не может быть установлено в течение отведенного интервала времени. А вот причин по которым это происходит может быть великое множество.

Как видно, основная рекомендация — увеличить параметры SQLNET.INBOUND_CONNECT_TIMEOUT, SQLNET.SEND_TIMEOUT и SQLNET.RECV_TIMEOUT. Можно попробовать сделать это, но это может не помочь. Поэтому лучше попробовать разобраться в корне проблемы.

Несколько основных причин ошибки и способы их решения

1) Серверные ресурсы перегружены.

Проверить насколько загружен сервер (процессор, диски, сеть). Выявить причину утечки ресурсов и устранить её. Большая загрузка сети может косвенно указывать на DoS. Если вы обнаружили высокую нагрузку сервера, но она оказалась полезной — то это указывает на нехватку мощности сервера и пора задуматься об его обновлении или замене.
©Bobrovsky Dmitry
2) Проблемы сети.
©Bobrovsky Dmitry
Если есть возможность проверить сетевой канал от клиента до сервера с помощью специализированых аппаратных или программных средств. Если нет, то можно запуститесь ping на некоторое время и посмотреть, какое время отклика и нет ли потерь пакетов.

ping server1 -t

3) База данных и Listener не функционируют.

Проверить что сама база данных и Listener запущены и работают нормально, что к ним можно подключиться локально или с других компьютеров сети.
Dmitry Bobrovsky
4) Проблемы из-за антивируса или firewall.
Dmitry Bobrovsky
Отключить или даже полностью деинсталировать антивирус или firewall.

5) Проблемы с DNS.

Либо прописать соответствующие записи в файл host либо во всех конфигурационных файлах oracle net использовать вместо имен — ip-адреса.
Запись fatal ni connect error 12170 ns main err code 12535 впервые появилась Dmitry Bobrovsky Blog

If your application (or SQLPLUS) is returning
ORA-12170 while connecting to the database, there are a few things that you can
verify in order to find out the root cause of the issue, and implement a
solution. Although sometimes it is quite difficult to find out the root cause,
I will discuss some major and quite common causes of this error message that
cause failure of application to connect with the database.

  • At the client side, check if you are using correct
    host name or IP address of the database server you are trying to connect.
    ADDRESS field of TNS service should reflect correct host name or IP address.
  • SALMAN12C =

     
    (DESCRIPTION =

        (ADDRESS
    = (PROTOCOL = TCP)(HOST = salman-pc.mydomain.com)(PORT
    = 1521))

       
    (CONNECT_DATA =

         
    (SERVER = DEDICATED)

         
    (SERVICE_NAME = salman12c)

        )

      )

  • Check if the database host name/IP is resolvable
    from the client side. Use either DNS for the name resolution, or “host” file of
    the client side to resolve the database server name with the IP address. Client
    host should also be resolvable from the database server and you can add client
    host name in the /etc/host file of the database server (if you are not using
    DNS)
  • If the database host name is not resolvable from the
    client, use IP address in the TNS service instead of host name.
  • Use “ping” command from the client side to check the
    network connectivity with the database server.
  • Check if there is an anti-virus running on client
    machine or the database server. There is a possibility that antivirus may be
    causing connectivity issues between client and the database server.
  • Lastly, check if listener log file has become very huge that could also cause ORA-12170.

Popular Posts — All Times

  • This error means that you are trying to perform some operation in the database which requires encryption wallet to be open, but wallet is …

  • Finding space usage of tablespaces and database is what many DBAs want to find. In this article I will explain how to find out space usage …

  • ORA-01653: unable to extend table <SCHEMA_NAME>.<SEGMENT_NAME> by 8192 in tablespace <TABLESPACE_NAME> This error is q…

  • You may also want to see this article about the ORA-12899 which is returned if a value larger than column’s width is inserted in the col…

  • This document explains how to start and stop an Oracle cluster. To start and stop Grid Infrastructure services for a standalone insta…

  • If you want to know how we upgrade an 11g database to 12c using DBUA,   click here .  For upgrading 12.1.0.1 to 12.1.0.2 using DBUA,   …

  • If database server CPU usage is showing 100%, or high 90%, DBA needs to find out which session is hogging the CPU(s) and take appropriate …

  • By default AWR snapshot interval is set to 60 minutes and retention of snapshots is set to 8 days. For better and precise investigation of…

  • SWAP space recommendation from Oracle corp. for Oracle 11g Release 2 If RAM is between 1 GB and 2 GB, SAWP should be 1.5 times the s…

  • This article explains how to install a 2 nodes Oracle 12cR1 Real Application Cluster (RAC) on Oracle Linux 7. I did this installation on O…

Понравилась статья? Поделить с друзьями:
  • Error ora 12154 tns could not resolve the connect identifier specified
  • Error ora 06519
  • Error ora 04091
  • Error ora 03135
  • Error ora 02292 integrity constraint