16.3.3 ORA-12170
Indicates that the connection failed with a timeout, such as Transmission Control Protocol (TCP) connect timeout, Outbound connect timeout, or Receive timeout.
Message
ORA-12170: Cannot connect.
string timeout of string for string.
(CONNECTION_ID=string)For example:
ORA-12170: Cannot connect.
TCP connect timeout of 30s for host 10.9.7.5 port 1522.
(CONNECTION_ID=1ABcDEabCd1aB+AbCdE1aB==)ORA-12170: Cannot connect.
Outbound connect timeout of 30s for host 10.9.7.5 port 1522.
(CONNECTION_ID=1ABcDEabCd1aB+AbCdE1aB==)ORA-12170: Cannot connect.
Receive timeout of 30s for host 10.9.7.5 port 1522.
(CONNECTION_ID=1ABcDEabCd1aB+AbCdE1aB==)
Cause
The connection request cannot be completed within the allotted time interval. This may be a result of network or system delays, or may indicate a denial-of-service (DoS) attack on the database server.
Action
-
If the error occurred in your application, then perform these tasks:
-
If you have used the
CONNECT_TIMEOUTorTRANSPORT_CONNECT_TIMEOUTparameters in an Easy Connect ortnsnames.oraconnection string, then set these parameters to a larger value.Alternatively, set one or all of these parameters in the clientsqlnet.orafile to a larger value:-
SQLNET.OUTBOUND_CONNECT_TIMEOUT -
SQLNET.RECV_TIMEOUT -
TCP.CONNECT_TIMEOUT
The connection string parameters take precedence over the corresponding
sqlnet.oraparameters. -
-
In the languages that support programmatic driver settings, adjust the settings equivalent to your specified timeout parameter values.
For example:
With JDBC, adjust
oracle.net.OUTBOUND_CONNECT_TIMEOUT,oracle.net.CONNECT_TIMEOUT, or usesetLoginTimeout().With Python,
python-oracledb, adjust thetcp_connect_timeoutparameter when callingconnect()orcreate_pool().
-
-
If the error occurred in the database alert log file, then set one or both of these parameters in the database
sqlnet.orafile to a larger value:-
SQLNET.INBOUND_CONNECT_TIMEOUT -
SQLNET.RECV_TIMEOUT
-
-
If you suspect a malicious client, then use the database alert log to identify the source address and then restrict the access.
-
Use the
CONNECTION_IDvalue to track this connection attempt in trace files for further diagnosis.