Cannot connect to DB failover cluster instance from application server in azure VM

Shuvajit Roy 166 Reputation points
2024-04-05T14:57:51.9233333+00:00

Database connection failed while I am trying to connect DB server instance from application server.

My environment:

  1. I have two DB servers in SQL failover cluster on top of windows clustering and an application server. Two DB servers and one application servers are in the same subnet A in vNet A in a resource group.
  2. I have the AD in vNet B and Subnet B in a different resource group.
  3. vNet peering is established between vNet A and vNet B and all servers are reachable through ping command between thr two vNets.
  4. I can RDP to all the vm's and can connect to the active nodes with SSMS.

My Scenario:

I am trying to deploy an application in App1 vm, however when I try to connect to the DB instance that is in failover clustering mode, the database connection fails.

Actions taken to resolve however issue persists:

  1. From the SQL server configuration manager of both DB vms, from the network TCP/IP status is Enabled and port 1433 is set.
  2. Incorporated 1433 in inbound and outbound rules of all the vm's NSG's.
  3. Allowed windows inbound & outbound firewall rules of app1 vm and db1 & db2 vm's with port 1433. Turned off windows firewall off in (AD, DB1, DB2, APP1) vm's.
  4. AD IP: 10.0.0.4, DB1 IP: 192.168.0.8, DB2 IP: 192.168.0.9, APP1 IP: 192.168.0.6 windows cluster IP: 192.168.0.10, sql cluster IP: 192.168.0.11.

However, I configured the same configuration in my on-prem lab it worked perfectly fine. The only difference was that the AD in on-prem lab was in the same subnet. Moreover, I do not presume there should be any issue in having the AD in a different vNet in Azure as long as it is peered and reachable, predominantly this is what peering is meant for.

My azure lab architecture attached as screenshot. Can anybody help he with the solution?

User's image

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,376 questions
Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
980 questions
{count} votes