Connecting to Availability Group Listener using JDBC getting error

615 views Asked by At

I am getting the below error when my application tries to connect using AG Listener thru JDBC. Multisubnetfailover=true has been added to the connection string, but it is still not working.

TCP/IP connection to the host , port 1433 has failed. Error: "Listener": Name or service not known. 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.

When the application is trying to connect using the IP on port 1433, it is working.

Here is the connection string:

jdbc:sqlserver://Listener:1433;databaseName=test;MultiSubnetFailover=true
0

There are 0 answers