Cannot connect to DB failover cluster instance from application server in azure VM
Database connection failed while I am trying to connect DB server instance from application server.
My environment:
- 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.
- I have the AD in vNet B and Subnet B in a different resource group.
- vNet peering is established between vNet A and vNet B and all servers are reachable through ping command between thr two vNets.
- 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:
- From the SQL server configuration manager of both DB vms, from the network TCP/IP status is Enabled and port 1433 is set.
- Incorporated 1433 in inbound and outbound rules of all the vm's NSG's.
- 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.
- 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?