Communications link failure performing JDBC Query error Could not get JDBC Connection; nested exception
search cancel

Communications link failure performing JDBC Query error Could not get JDBC Connection; nested exception

book

Article ID: 198062

calendar_today

Updated On:

Products

CA API Gateway API SECURITY

Issue/Introduction

When connecting to an oracle database server

If seeing this error as below when trying to do perform JDBC query.

Failed due to Could not get JDBC Connection Could not get JDBC Connection nested exception is java sql SQLException An SQLException was provoked by the following failure java lang InterruptedException java lang InterruptedException

Environment

Release : 10.x

Component : API GATEWAY

Resolution

If using the Data Collector tool,

You can review DCT file: 

netstat-tnap.txt 

In this case it shows :

SYN_SENT , means a problem (firewall, something blocking that connection):
tcp        0      1  ##.###.##.##.###:14121         ##.###.##.##.###:1522          SYN_SENT    3658/java

Ssg log shows :
2020-08-20T09:41:47.683-0500 WARNING 85 com.l7tech.server.cluster.DatabaseReplicationMonitor: 2380: Error accessing host/database localhost/ssg: 
Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

One possible reason as in this case, is a Network Issue , Server  ##.###.##.##.###:1522 blocked by firewall