Skip to main content
Waters

Error "Connect timeout occurred" when testing a connection to an Oracle database via SQL*Plus - WKB26750

Article number: 26750

SYMPTOMS

  • The following error message appears when connecting to a server with the command-line SQL*Plus tool:
    • "Connect timeout occurred"
  • The error message appears on the command line after a short delay

ENVIRONMENT

  • NuGenesis 8 SDMS
  • NuGenesis 8 LMS
  • NuGenesis 8 ELN
  • Empower 2
  • Empower 3

CAUSE

The SQL*Plus client is unable to connect to the service name specified in the command line because of a network or configuration error.

FIX or WORKAROUND

  1. Confirm that the service name, hostname, and port number are correct in the client's tnsnames.ora file.
  2. Confirm that the Oracle TNS Listener service is started on the Oracle Database server.
  3. On the command line, ping the hostname from the tnsnames.ora file and look at the IP address displayed in brackets [ ] by the Ping program.
  4. If the IP address in brackets is wrong, look in the Hosts file for entries that contain invalid IP addresses for the database's hostname.
    1. Edit the following file in Notepad (requires Administrator rights): C:\Windows\system32\drivers\etc\hosts
    2. Delete any line that has the database's hostname.
    3. Save and close the file.
    4. Ping the database hostname and confirm the IP address in brackets; it should now be resolved from the network's DNS servers.
  5. Ensure that any firewall on the Oracle database server allows inbound traffic on TCP port 1521 (the default port), or the port number as listed in the tnsnames.ora file if different from the default.
    • Most firewalls block ICMP echo requests (Ping), so a failed Ping test—where all requests time out—is not itself indicative of a failure.

ADDITIONAL INFORMATION

The hosts file is given priority over DNS responses when resolving hostnames to IP addresses. Try not to use entries in the hosts file to fix problems in hostname resolution, as they are prone to failure. If a server has a DHCP-assigned IP address and its address changes, the entry in the hosts file will be incorrect, leading to connection problems for the clients.

id26750,

Not able to find a solution? Click here to request help.