When I visit my client site for doing performance tuning consulting, I sometimes get trapped with some unrelated issue. Here is one of the situation where they were upgrading from SQL 2008 R2 to SQL 2014 on a two node cluster. During upgrade two rules were failing. In this blog post we will learn about how to fix when rule “Windows Management Instrumentation (WMI) Service” fails.
Failing Rule 1
Rule “Windows Management Instrumentation (WMI) service” failed.
The WMI service is not running on the cluster node.
Failing Rule 2
Rule “Not clustered or the cluster service is up and online.” failed.
The machine is clustered, but the cluster is not online or cannot be accessed from one of its nodes. To continue determine why the cluster is not online and rerun setup instead of rerunning the rule since the rule can no longer detect a cluster environment correctly.
As per MSDN documentation, I found Detail.txt file and here was the stack when error occurred
(06) 2016-11-19 19:59:09 Slp: Error while retrieving the cluster WMI namespace on machine NODE03; Error is as follows System.Management.ManagementException: Invalid class
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObject.Initialize(Boolean getObject)
at System.Management.ManagementBaseObject.get_Properties()
at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
at Microsoft.SqlServer.Configuration.WMIInterop.Cluster.get_Name()
at Microsoft.SqlServer.Configuration.Cluster.Rules.WMIServiceFacet.ClusterWmiCheck()
I tried following test for WMI based on my internet search:
- Start > Run > WBEMTest
- The “Windows Management Instrumentation Tester” will launch
- Select Connect
- Namespace: Root\MSCluster
- Select Connect
If we see more options available, it means you are connected and WMI is working. In my case, I received below error
Number: 0x80041010
Facility: WMI
Description: Invalid Class
WORKAROUND/SOLUTION
Since there was invalid class for cluster this means that cluster namespace missing in WMI. So, we need to compile the .mof file for cluster. Here is the magical command which fixed all above errors.
Mofcomp.exe ClusWMI.mof
Once above command had run it added the namespace back.
Did you see same error and found different solution? Please share with other readers.
Reference: Pinal Dave (http://blog.sqlauthority.com)
First appeared on SQL SERVER – Rule “Windows Management Instrumentation (WMI) Service” failed