AAI - "The Network Adapter could not establish the connection" in the server.log on startup
search cancel

AAI - "The Network Adapter could not establish the connection" in the server.log on startup

book

Article ID: 265823

calendar_today

Updated On:

Products

Automation Analytics & Intelligence

Issue/Introduction

When trying to start AAI which is using an Oracle database, the error below is seen in the server.log and nohup.out file.

The required Oracle Database driver is already installed in the AAI /<Install Dir>/jboss/standalone/deployments directory.

Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
    at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:78)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
    ... 51 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1507)
    at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
    ... 54 more
Caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:902)
    at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:813)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:80)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:816)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:620)
    at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)
    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
    at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
    at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)
    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:720)
    at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:586)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:729)
    at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:708)
    at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:221)
    at oracle.net.ns.NSProtocol.connect(NSProtocol.java:353)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1701)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:626)
    ... 13 more
Caused by: java.io.IOException: Connection timed out, socket connect lapse 130066 ms. /10.x.x.x 1521 0 1 true
    at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:252)
    at oracle.net.nt.ConnOption.connect(ConnOption.java:195)
    at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:653)
    ... 20 more
Caused by: java.net.ConnectException: Connection timed out
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:482)
    at sun.nio.ch.Net.connect(Net.java:474)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
    at oracle.net.nt.TimeoutSocketChannel.connect(TimeoutSocketChannel.java:109)
    at oracle.net.nt.TimeoutSocketChannel.<init>(TimeoutSocketChannel.java:95)
    at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:211)
    ... 22 more

Environment

Release : 6.4.5.2

Resolution

The error indicated a network connection issue between the AAI server and the Oracle database server.

  • Work with your DBA to verify the connection details are correct.
  • Verify that all database connection details, including hostname/IP, port, and service name are correct.
  • Verify the hostname or IP address that is in the AAI configuration tool is listed in the listener.ora and tnsnames.ora on the Oracle database server.
  • Verify the tns listener service is started, by running "lsnrctl status" on the Oracle database server.
  • If using a hostname for the connection verify that the hostname is resolving to the correct IP address.
  • Verify that the port and IP address are allowed through any firewalls on the network.
  • If using an Oracle cluster, represented by a hostname alias, verify the IP address shown in the logs message below can be reached from the AAI server:

Caused by: java.io.IOException: Connection timed out, socket connect lapse 130066 ms. /10.x.x.x 1521 0 1 true