Error on Availability Group – Failed to open the Windows Server Failover Clustering (WSFC) resource

This error can be solved in a number of different ways. Some are easy and low impact, the worst case is you will need to remove HA from your node(s) and then re add it.

Here is the complete error:

Failed to open the Windows Server Failover Clustering registry subkey ‘%.*ls’ (Error code %d). The parent key is the cluster root key. The WSFC service may not be running or may not be accessible in its current state, or the specified arguments are invalid. If the corresponding availability group has been dropped, this error is expected. For information about this error code, see “System Error Codes” in the Windows Development documentation.

Solution 1 – Completing replica set up, or removing secondary replica

This can be a very simple problem, however the error does not really point you in the right direction. If you have not completed the setup of the database on your replica(s) you might get this error. To resolve either complete setup or remove the replicas from the availability group.

Solution 2 – Take resource offline and then bring back online

Self explanatory, try taking the resource offline or fail it to another node and then fail it back.

Solution 3 – Restart the node

If you still haven’t resolved it with the prior solutions restart the node.

Solution 4 – Remove HA and Re add

Hopefully you don’t have to do this. But as per Microsoft the only solution I have left for you is to remove all your HA replicas and AG groups and then untick the Availability Group feature in SQL Configuration manager. Restart SQL and then add the feature back again. As per the article you may need to do this on every node.

Rob StGeorge

Senior SQL Server Database Administrator residing in Auckland, NZ

Leave a Reply