ORACLE : Io exception: The Network Adapter could not establish the connection

We are getting this error sporadically. With the same TNS, we are able to make proper connections to the database. But we see this in the logs while make connections some times. Following is the stack trace. This is db connection to Oracle from a Linux machine and java application Any help is appreciated.

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.T4CConnection.logon(
at oracle.jdbc.driver.PhysicalConnection.(
at oracle.jdbc.driver.T4CConnection.(
at oracle.jdbc.driver.T4CDriverExtension.getConnection(
at oracle.jdbc.driver.OracleDriver.connect(
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(
at oracle.jdbc.pool.OracleDataSource.getConnection(
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(
at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(
at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(
at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(
at oracle.jdbc.pool.OracleDataSource.getConnection(
at oracle.jdbc.pool.OracleDataSource.getConnection(
at oracle.jdbc.pool.OracleDataSource.getConnection(

try following

  1. (obvious) IP address is incorrect – try PING
  2. The port is not open, or is blocked by a firewall – try TELNET
  3. The DB listener is not running or is binding to a different network
    interface – again, TELNET should confirm this (also use Oracle client
    tools to connect)
  4. No local ports are available for the out-going connection
    (unlikely) – only if you’re making thousands of connections, or
    creating hundreds of new connections every minute.

Check, maybe you must change listener.ora’s file host parameter to your host parameter. You can check that what parameter is your hostname in windows, cmd>hostname