tDBConnection_1 IO Error: The Network Adapter could not establish the connection\njava.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

0

Getting this error when trying to connect from AWS to on-prem Oracle DB using VPN tunnel: tDBConnection_1 IO Error: The Network Adapter could not establish the connection\njava.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection. Thanks in advance and appreciate any inputs/ideas on this.

Thanks, Srini

asked 2 years ago808 views
1 Answer
1

Hi,

I understand that you are encountering a “IO Error: The Network Adapter could not establish the connection`” error when attempting to connect from your AWS VPC to on premise resource over VPN. The error message appears to be an application specific error message. It is therefore not clear from my perspective the exact cause of this error. As the error indicates an issue establishing a connection I suggest checking the following to rule out any network configuration issues in your VPC:

  1. Source instance security group - Is the intended traffic allowed in your outbound security group. If this is allowed then the response traffic is also automatically allowed back in.
  2. Source Nacl Inbound and Outbound - Is the intended traffic allowed outbound and is the response traffic allowed inbound.
  3. Route Table - Do you have a route to the destination IP pointing to your VPN. Once you have verified that traffic is allowed in the Security Group and NACL. And you have also confirmed that you have a route to the destination then this rules out any potential blockers in the VPC configuration. As a next step you can then also enable VPC flow logs[1] which will give you a visual representation of your traffic to and from the destination IP. In researching the error message you are seeing I also found that this error could indicate the following:
  4. The database is not running.
  5. The 'hostname, port' combination is invalid.
  6. The database is not registered with the listener/Not listening on the port you are connecting to. You can run "sudo netstat -tlpn" to check that the database is running and listening on the specified port. I also found the following commands below in researching the error message. Executing 'lsnrctl services' and 'lsnrctl status' will show you what services the listener is aware of and what parameters are needed to connect to them.

Publish flow logs to CloudWatch Logs

https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-cwl.html

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions