ORA-12170: TNS: connect timeout occurred
The client gave up waiting to connect: the host is unreachable, a firewall silently drops the traffic, or the server was too slow to respond.
- Error code
ORA-12170- Category
- Connection and login
What it means
ORA-12170 means the connection attempt didn't complete in time. Unlike ORA-12541, nothing refused the connection; the packets went unanswered. That points at the network: a wrong IP address, routing, or a firewall that drops rather than rejects.
Newer releases add detail: Cannot connect. timeout_type timeout of timeout for host_port., naming which timeout fired.
Common causes
- A firewall or security group dropping traffic to the listener port.
- A wrong or unreachable host address, for example a private IP from outside the network.
- A very slow or overloaded server or network, with a short
SQLNET.OUTBOUND_CONNECT_TIMEOUTorCONNECT_TIMEOUT.
How to fix it
-
Test reachability from the client machine:
nc -vz db-host 1521ortnsping. If it hangs, it's the network path. -
Open the listener port in every firewall between client and server, including cloud security groups.
-
If the network is just slow, raise the connect timeout in the client's
sqlnet.ora(SQLNET.OUTBOUND_CONNECT_TIMEOUT) or the descriptor'sCONNECT_TIMEOUT.
Related errors
ORA-12541TNS: no listenerORA-03113end-of-file on communication channelORA-12154TNS: could not resolve the connect identifier2003MySQL: Can't connect to MySQL server on host
More connection and login errors
ORA-01017invalid username/password; logon deniedORA-12514TNS: listener doesn't know the requested serviceORA-12505TNS: listener doesn't know the SIDORA-03135connection lost contactORA-28000the account is lockedORA-28001the password has expiredORA-01034ORACLE not availableORA-27101shared memory realm does not exist
The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.
Work on Oracle in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.