SQL SERVER – Patch Install Rule Error – Not Clustered or the Cluster Service is Up and Online

As they say, there are many ways to bell a cat. But in my consulting career, I have seen the same error due to multiple causes. In this blog, we would talk about one such error which can be seen during the installation of a service pack or cumulative update of SQL Server in a clustered environment. The error which we observed was a failure of a rule – Patch Install Rule Error – Not clustered or the cluster service is up and online.

Here is the image of what we saw on the installation screen.

As I mentioned earlier, I had an earlier blog on the same error which you can read below. SQL SERVER – Patch Rule Failure: Not Clustered or the Cluster Service is Up and Online

The solution given in that blog didn’t help. We looked into Detail.txt which is one of the log file generated by setup. The place where it failed was below:

Slp: Initializing rule : Not clustered or the cluster service is up and online.
Slp: Rule is will be executed : True
Slp: Init rule target object: Microsoft.SqlServer.Configuration.Cluster.Rules.ClusterServiceFacet
Slp: Invalid class
Slp: at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
at Microsoft.SqlServer.Configuration.Cluster.Rules.WMIInterop.Service.ServiceCollection.ServiceEnumerator.MoveNext()
at Microsoft.SqlServer.Configuration.Cluster.Rules.ClusterServiceFacet.Microsoft.SqlServer.Configuration.RulesEngineExtension.IRuleInitialize.Init(String ruleId)
at Microsoft.SqlServer.Configuration.RulesEngineExtension.RulesEngine.Execute(Boolean stopOnFailure)
Slp: Rule initialization failed – hence the rule result is assigned as Failed
Slp: Send result to channel : RulesEngineNotificationChannel

Even the error message is similar, but the stack is different. Here is the simplified version.

Invalid class

When I saw “Invalid Class” this looked like an issue with WMI state on the machine. Here are the steps you can do to confirm the issue. Launch the WMI MMC snap-in by Start -> Run -> type WMIMGMT.MSC -> hit enter. It would open a window. In that right-click “WMI Control (Local)” and click Properties. If you see below then you can fix the issue by following further.

This confirms that Windows WMI is broken, and we need to recompile MOF files. For my client, below worked.

mofcomp C:\Windows\System32\WBEM\cimwin32.mof

If it doesn’t work then you may try compiling all mof files using the below script.

CD C:\Windows\System32\WBEM

dir /b *.mof *.mfl | findstr /v /i uninstall > allmoflist.txt & for /F %s in (allmoflist.txt) do mofcomp %s

Please let me know via comments if it helped you.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Exit mobile version