Skip to content

After upgrade JDBC from 6.4 to 12.8, Application failed to connect its database (AWS RDS MSSQL) #2595

Open
@Jutamat007te

Description

@Jutamat007te

Driver version

JDBC 12.8

SQL Server version

Database : AWS RDS MS SQL 2019 Standard edition , Always On

Client Operating System

RHEL 8.8

JAVA/JVM version

JVM 11

Table schema

Provide the table schema to repro the issue.

Problem description

Provide full details of the problem.

Expected behavior

Application , Java application running with Apache Tomcat 9.0.97
Database : AWS RDS MS SQL 2019 Standard edition , Always On
JDBC : 12.8
Symptom : when restart the application , there is following error and the application shutdown due to cannot connect to its database
Interim solution : adding transparentNetworkIPResolution=true or multiSubnetFailover=true into JDBC connection properties
However in Microsoft JDBC knowledge base Setting the connection properties - JDBC Driver for SQL Server | Microsoft Learn.

it mentioned, that " Beginning with Microsoft JDBC Driver 6.0 for SQL Server, it's no longer required to set multiSubnetFailover to "true" to connect to an availability group listener. A new property, transparentNetworkIPResolution, which is enabled by default, provides the detection of and connection to the (currently) active server.

JDBC trace logs

Loading JCIFS configuration from: /app/AppSystems/config/jcifs.properties
Loading JNQ configuration from: /app/AppSystems/config/jnq.properties
java.lang.RuntimeException: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The TCP/IP connection to the
host listener.mydatabase-mssqldb-rds.mx6ldguybgep.eu-west-2.rds.amazonaws.com, port xxxx
has failed. Error: "connect timed out. Verify the connection properties.
Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
at com.appanywhere.ga.data.access.DataAccessLayerFactory.initDataSource(DataAccessLayerFactory.java:83)
at com.appanywhere.ga.data.access.DataAccessLayerFactory.initSequenceDataSource(DataAccessLayerFactory.java:76)
at com.appanywhere.ga.data.access.DataAccessLayerFactory.(DataAccessLayerFactory.java:58)
at com.appanywhere.ga.core.system.DataFactory.initialize(DataFactory.java:219)
at com.appanywhere.commons.stream.MemoizingSupplier.get(MemoizingSupplier.java:92)
at com.appanywhere.ga.core.system.DataFactory.getConnection(DataFactory.java:143)
at com.appanywhere.ga.core.system.DataFactory.getConnection(DataFactory.java:131)
at com.appanywhere.ga.core.settings.SettingsController.getSettingsAsMap(SettingsController.java:544)
at com.appanywhere.ga.core.settings.SettingsAPI.getAllSettingsAsMap(SettingsAPI.java:50)
at com.appanywhere.dpa.DPASettings.loadSettings(DPASettings.java:1532)
at com.appanywhere.dpa.DPASettings.load(DPASettings.java:766)
at com.appanywhere.commons.stream.MemoizingSupplier.get(MemoizingSupplier.java:92)
at com.appanywhere.dpa.DPASettings.initialize(DPASettings.java:772)
at com.appanywhere.startup.TomcatStarter.start(TomcatStarter.java:328)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.appanywhere.bootstrap.AppAnywhereBootstrap.main(AppAnywhereBootstrap.java:82)
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The TCP/IP connection to the host
listener.mydatabase-mssqldb-rds.mx6ldguybgep.eu-west-2.rds.amazonaws.com, port xxxx has failed.
Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP
connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
... 14 more
Application was shut down.

Metadata

Metadata

Assignees

Labels

DocumentationPull requests that update documentationWaiting for ResponseWaiting for a reply from the original poster, or affiliated party

Type

No type

Projects

Status

Waiting for Customer

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions