Issue with adding the replica and failing with the error "No quorum set exists across the WSFC cluster."

Last week, I was working on one of my clients' issues where in they were trying to actually trying to get the Availability group to a healthy, stable state from the resolving state.

The basic issue started with the Windows cluster shutting down the secondary replica and even though it immediately came online within a few seconds still the AG was in the resolving state.

Post which before reach out to us, they had tried to do a remove replica operation for the secondary from the primary, but when checked on the secondary we were still seeing the AG in the resolving state and the AG databases in the Recovery Pending state. Thus, getting on call, dropped all the databases and and also the AG from the secondary replica. Post which we tried to add the replica back again from the primary which was failing with the below error :

TITLE: Microsoft SQL Server Management Studio
------------------------------
The local node is not part of quorum and is unable to initiate a failover. This could be caused by one of the following reasons:
• The local node is not able to communicate with the WSFC cluster.
• No quorum set exists across the WSFC cluster.
For more information on recovering from quorum loss, see SQL Server Books Online.
(Microsoft.SqlServer.Management.HadrTasks)
------------------------------

Also when we tried to connect to the secondary replica from the primary replica we were getting the below error :

TITLE: Connect to Server
------------------------------
Cannot connect to Secondary.
------------------------------
ADDITIONAL INFORMATION:
The specified instance of SQL Server is hosted by a system that is not a Windows Server Failover Cluster(WSFC) node. (Microsoft.SqlServer.Management.HadrTasks)
------------------------------

These error indicated issues with the Cluster, but on the other hand, the cluster was rock stable with the nodes up and running and the resources online.

Post which we tried to un-check and check the 'Enable AlwaysOn Availability Groups' option from the SQL Server Configuration Manager as shown below :

Note that this needs a SQL restart on the respective nodes to bring this change to effect. This move actually resolved the issue for us and we were through in adding the replica to the AG.

 

Hope this helps !! Happy Replicating !!