I have 2 locations and each has its own WSFC.
-
Cluster 1: WSFC,Datacenter1, Node1, Node2. Listener1
-
Cluster 2: WSFC, Datacenter2, Node3, Node4. Listener2
Created an Availability group as EXTERNAL
cluster type.
When simulating Failover, by switching nodes, puts database in RESOLVING mode.
Looking into SQL Error Log on primary replica:
The state of the local availability replica in availability group 'AG_AW2017' has changed from 'NOT_AVAILABLE' to 'RESOLVING_NORMAL'. The state changed because the local instance of SQL Server is starting up. For more information, see the SQL Server error log or cluster log. If this is a Windows Server Failover Clustering (WSFC) availability group, you can also see the WSFC management console.
Looking into SQL Error Log on secondary replica:
A connection timeout has occurred on a previously established connection to availability replica 'Primary' with id [1B93C7DC-75E3-4180-9748-AC1B662781A9]. Either a networking or a firewall issue exists or the availability replica has transitioned to the resolving role
If I try to use WSFC as cluster type, then I will not be able to add Replica. I will get an error saying:
Cannot connect to Listener2. The specified instance of SQL Server is not part of the same Windows Server Failover Cluster (WSFC) as the primary node.
Spent quite bit of time on it, but still couldn't figure out what exactly the problem here.
Best Answer
From the Microsoft Docs for CREATE AVAILABILITY GROUP:
Since you mention you're using Windows Server Failover Clustering, the implication is that you are using Windows, and should not have the "Cluster Type" set to EXTERNAL. It should be set to WSFC.