Few of my clients are still running older versions of SQL Server and they have their own reasons to not to move to the new SQL version. In this blog, we would learn about the fix of an error for which my client contacted me. My client was trying to apply the patch to a SQL Server 2008 R2 clustered instance which was running on Window Server 2012 and getting the error: Unable to retrieve the Cluster Service – Not clustered or the cluster service is up and online.
First, I asked to share Detail.txt to understand the exact error. Here is the information available. I have added a bullet point for clarity.
- Slp: Unable to retrieve the Cluster Service
- Slp: System.InvalidOperationException: The given key was not present in the dictionary. —> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
- ThrowHelper.ThrowKeyNotFoundException()
- Collections.Generic.SortedList`2.get_Item(TKey key)
- SqlServer.Chainer.Infrastructure.ServiceContainer.GetService(Type serviceType)
- — End of inner exception stack trace —
- SqlServer.Chainer.Infrastructure.ServiceContainer.GetService(Type serviceType)
- SqlServer.Chainer.Infrastructure.ServiceContainer.GetService[T]()
- SqlServer.Chainer.Infrastructure.ServiceContainer.get_Cluster()
- SqlServer.Configuration.SetupExtension.RunDiscoveryAction.ExecuteAction(String actionId)
One of the causes of the above error is found earlier which I shared via below blog. SQL SERVER – Patch Rule Failure: Not Clustered or the Cluster Service is Up and Online
The blog above should be used when the cluster is in a bad shape. But in the current situation, my client had cluster working fine. It was just the SQL patch setup which was not able to talk to the cluster.
WORKAROUND/SOLUTION
I knew that there are articles from Microsoft which talks about but I was not getting any hit with the error which I saw in Detail.txt
Finally, we found that “Failover Cluster Automation Server” feature was not installed. This is default setting when install windows cluster service, but the feature is needed when installing the SQL Server 2008 R2 patch. Here is the PowerShell command to add the feature.
Add-WindowsFeature -Name RSAT-Clustering-AutomationServer
Finally, I found KB which talks about the solution.
Here is the snippet from the article.
To resolve this issue, do one of the following:
- Enable the Failover Cluster Automation Server feature on each node by using Server Manager. In Server Manager, expand Remote Server Administration Tools, expand Feature Administration Tools, expand Failover Clustering Tools, and then click to select Failover Cluster Automation Server.
Here is the PowerShell screenshot while installing it. I have used below command to view the feature.
Get-WindowsFeature RSAT-Cluster*
Hope this blog help in finding the solution of patch failure. Please comment and let me know.
Reference: Pinal Dave (https://blog.sqlauthority.com)
First appeared on SQL SERVER – Patch Failure – Unable to Retrieve the Cluster Service