Troubleshooting of FatalNIconnecterror12170.
Check the database alarm log and find the error: Fatal NI connect error 12170.
The alarm log is as follows:
**************************************** *******************************
Fatal NI connect error 12170.
Version information:
TNS for Linux: Version 11.2.0.1.0-Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0-Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0-Production
Time: 26-OCT-2014 06:05:44
Tracing not turned on.
Tns error struct:
Ns main err code: 12535
Version information:
TNS for Linux: Version 11.2.0.1.0-Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0-Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0-Production
Time: 26-OCT-2014 06:05:44
Tracing not turned on.
Tns error struct:
Ns main err code: 12535
TNS-12535: TNS: operation timed out
Ns secondary err code: 12606
Nt main err code: 0
Nt secondary err code: 0
Nt OS err code: 0
Client address: (ADDRESS = (PROTOCOL = tcp) (HOST = 10.53.105.20) (PORT = 19164 ))
Version information:
TNS for Linux: Version 11.2.0.1.0-Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0-Production
TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0-Production
Time: 26-OCT-2014 06:05:44
Tracing not turned on.
Tns error struct:
Ns main err code: 12535
TNS-12535: TNS: operation timed out
Ns secondary err code: 12606
Nt main err code: 0
Nt secondary err code: 0
Nt OS err code: 0
Client address: (ADDRESS = (PROTOCOL = tcp) (HOST = 10.53.105.20) (PORT = 19166 ))
TNS-12535: TNS: operation timed out
Ns secondary err code: 12606
Nt main err code: 0
Nt secondary err code: 0
Nt OS err code: 0
Client address: (ADDRESS = (PROTOCOL = tcp) (HOST = 10.53.105.20) (PORT = 19165 ))
Sun Oct 26 06:05:50 2014
Successfully onlined Undo Tablespace 2.
Verifying file header compatibility for 11g tablespace encryption ..
Verifying 11g file header compatibility for tablespace encryption completed
**************************************** *******************************
[Solution]
[Oracle @ node1 ~] $ Lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0-Production on 02-MAR-2015 12:34:22
Copyright (c) 1991,200 9, Oracle. All rights reserved.
Connecting to (ADDRESS = (PROTOCOL = tcp) (HOST =) (PORT = 1521 ))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0-Production
Start Date 02-MAR-2015 09:45:49
Uptime 0 days 2 hr. 48 min. 33 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File/u01/11.2.0/grid/network/admin/listener. ora
Listener Log File/u01/app/oracle/diag/tnslsnr/node1/listener/alert/log. xml
Listening Endpoints Summary...
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = LISTENER )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.53.105.20) (PORT = 1521 )))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp) (HOST = 10.53.105.24) (PORT = 1521 )))
Services Summary...
Service "+ ASM" has 1 instance (s ).
Instance "+ ASM1", status READY, has 1 handler (s) for this service...
Service "xcky" has 1 instance (s ).
Instance "xcky1", status READY, has 1 handler (s) for this service...
Service "xckyXDB" has 1 instance (s ).
Instance "xcky1", status READY, has 1 handler (s) for this service...
The command completed successfully
[Oracle @ node1 ~] $ Cd/u01/11.2.0/grid/network/admin/
[Oracle @ node1 admin] $ ls
Endpoints_listener.ora listener. ora samples sqlnet. ora
Listener1410255PM1539. bak listener. ora. bak. node1 shrept. lst
[Root @ node1 admin] # chmod 775 listener. ora
[Root @ node1 admin] # chmod 775 sqlnet. ora
-- Confirm the oracle user's permission to access the configuration file
[Oracle @ node1 admin] $ vi listener. ora
-- Add INBOUND_CONNECT_TIMEOUT_LISTENER = 0
-- Add parameter DIAG_ADR_ENABLED_LISTENER = OFF
LISTENER = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC) (KEY = LISTENER) # line added by Agent
LISTENER_SCAN1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC) (KEY = LISTENER_SCAN1) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1 = ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER = ON # line added by Agent
INBOUND_CONNECT_TIMEOUT_LISTENER = 0
DIAG_ADR_ENABLED_LISTENER = OFF
~
~
[Oracle @ node1 admin] $ vi sqlnet. ora
-- Add parameter DIAG_ADR_ENABLED = OFF
-- Add SQLNET. INBOUND_CONNECT_TIMEOUT = 0
# Sqlnet. ora. node1 Network Configuration File:/u01/11.2.0/grid/network/admin/sqlnet. ora. node1
# Generated by Oracle configuration tools.
NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
ADR_BASE =/u01/app/oracle
DIAG_ADR_ENABLED = OFF
SQLNET. INBOUND_CONNECT_TIMEOUT = 0
~
~
[Official documentation]
Let's take a look at the instructions in the official documentation as follows:
ORA-12170: TNS: Connect timeout occurred
Cause: The client failed to establish a connection and complete authentication in the time specified by the SQLNET. INBOUND_CONNECT_TIMEOUT parameter in the sqlnet. ora file. this error may be a result of network or system delays, or it may indicate that a malicious client is trying to cause a denial-of-service attack on the database server.
See Also:
"Refreshing the Listener and the Oracle Database To Limit Resource Consumption By Unauthorized Users" further information about setting the SQLNET. INBOUND_CONNECT_TIMEOUT parameter
Action: If the error occurred due to system or network delays that are normal for the participating environment, then perform these steps:
Turn on tracing to determine where clients are timing out.
See Also:
"Tracing Error Information for Oracle Net Services"
Reconfigure the SQLNET. INBOUND_CONNECT_TIMEOUT parameter in sqlnet. ora to a larger value.
If you suspect a malicious client, then perform these steps:
Locate the IP address of the client in the sqlnet. log file on the database server to identify the source.
For example, the following sqlnet. log excerpt shows a client IP address of 10.10.150.35.
Fatal NI connect error 12170.
Version information:
TNS for Solaris: Version 10.1.0.2.0
Oracle Bequeath NT Protocol Adapter for Solaris: Version 10.1.0.2.0
TCP/IP NT Protocol Adapter for Solaris: Version 10.1.0.2.0
Time: 03-JUL-2002 13:51:12
Tracing to file:/ora/trace/svr_13279.trc
Tns error struct:
Nr err code: 0
Ns main err code: 12637
TNS-12637: Packet receive failed
Ns secondary err code: 12604
Nt main err code: 0
Nt secondary err code: 0
Nt OS err code: 0
Client address: (ADDRESS = (PROTOCOL = tcp) (HOST = 10.10.150.35) (PORT = 52996 ))
Beware that an IP address can be forged.
If the time out occurs before the IP address can be retrieved by the database server, then enable listener tracing to determine the client that made the request.
See Also:
Tracing Error Information for Oracle Net Services
Restrict access to the client. For example, you can configure parameters for access rights in the sqlnet. ora file.
See Also:
"Logging ing Database Access Control"
[Process Overview]
The above is the official 10 Gb documentation. You can see the official documentation and provide a suggestion: Reconfigure the SQLNET. INBOUND_CONNECT_TIMEOUT parameter in sqlnet. ora to a larger value.
Find the instructions in the official documentation for SQLNET. INBOUND_CONNECT_TIMEOUT, such:
As shown above, this problem occurs because the database connection fails to be completed successfully, and the connection result shows that there is a delay. No clear processing method is found in the official documentation, but some configuration suggestions are provided.
In the follow-up on the Internet to search for the same kind of error handling method (there is information that this error can be found in the MOS documentation), combined with the official documentation, a preliminary understanding of the ORA-12170 error, since Oracle Net Diagnostic in the diagic diagnostic Repository is enabled, the connection delay error is obtained and written into the alarm log.
The reference of the MOS document posted by netizens is as follows:
To revert to Oracle Net Server tracing/logging, set following parameter in the server's sqlnet. ora:
DIAG_ADR_ENABLED = OFF
Also, to back out the ADR diag for the Listener component, set following parameter in the server's listener. ora:
DIAG_ADR_ENABLED _ = OFF
-Where Wocould be replaced with the actual name of the configured listener (s) in the listener. ora configuration file. For example, if the listener name is 'listener ', the parameter wocould read:
DIAG_ADR_ENABLED_LISTENER = OFF
-Reload or restart the TNS Listener for the parameter change to take effect.
Solution provided on Metalink posted by netizens
1. set INBOUND_CONNECT_TIMEOUT _ = 0 in listener. ora
2. set SQLNET. INBOUND_CONNECT_TIMEOUT = 0 in sqlnet. ora of server.
3. stop and start both listener and database.
4. Now try to connect to DB and observe the behaviour