共用方式為


Unable to launch Cluster Failover Manager on any node of a 2012/2012R2 Cluster

When Failover Cluster Manager is opened to manage a Cluster, it will contact all the nodes and retrieve Cluster configuration information using WMI calls. If any one of the nodes in the Cluster does not have the cluster namespace "root\mscluster" in WMI, Failover Cluster Manager will fail and give one of the below errors:

clip_image002

Or,

Unfortunately, it does not give any indication of which node is missing the WMI namespace.  One of the ways you can check to see which one has it missing is to run the below command on each node of the Cluster.

Get-WmiObject -namespace "root\mscluster" -class MSCluster_Resource

It can be a bit tedious and time consuming if you have quite a few nodes, say like 64 of them.  The below script can be run on one of the nodes that will connect to all the other nodes and check to see if the namespace is present.  If it is, it will succeed.  If the namespace does not exist, it will fail.

-----------------
Set-ExecutionPolicy unrestricted

cls

If(import-module failoverclusters)
{

Write-Host "Imported Cluster module"

}

Write-Host "Getting the cluster nodes..." -NoNewline
$nodes = Get-ClusterNode
Write-host "Found the below nodes "
Write-host " "
$nodes
Write-host ""
Write-host "Running the WMI query...."
Write-host " "
ForEach ($Node in $nodes)
{
Write-Host -NoNewline $node

              if($Node.State -eq "Down")
{

                    Write-Host -ForegroundColor White " : Node down skipping"
}

else
{

           Try
{
#success

              $result = (get-wmiobject -class "MSCluster_CLUSTER" -namespace "root\MSCluster" -authentication PacketPrivacy -computername $Node -erroraction stop).__SERVER
Write-host -ForegroundColor Green " : WMI query succeeded "
}
Catch
{

#Failure

              Write-host -ForegroundColor Red -NoNewline " : WMI Query failed "
Write-host "//"$_.Exception.Message
}
}

}
-----------------

In the below example, you can see that one of the nodes failed.

To correct the problem, you would need to run the below from an administrative command prompt on the "failed" node(s).

cd c:\windows\system32\wbem
mofcomp.exe cluswmi.mof

Once the Cluster WMI has been added back, you can successfully open Failover Cluster Management.  There is no restart of the machine or the Cluster Service needed.

Now, the next question you may have is, "well how did I get this way in the first place".  The answer is actually a command from the old days to "fix" the WMI repository.  In earlier days, if there was a problem with WMI, they would change to the above directory and run mofcomp.exe *.mof.  This will take all the .MOF (Managed Object File) files in the directory and recompile them.  The problem with this command is is does "all" of them. 

When you install Roles and Features that utilize WMI, there is a .MOF file to add itself to the repository.  There is also an uninstall .MOF file to remove itself if the role/feature is removed.  When you run with the *.mof switch, it could run the install first and the uninstall second.  So you are basically removing the namespaces to fix a problem.  Cluster is one of the ones that has an uninstall file.  To correct it, you have to run the above.  Since there are multiple uninstall files for other roles/features, you may need to run with those install files as well.

The proper ways of recompiling the WMI Repository is with the use of WINMGMT.EXE.

WINMGMT
https://msdn.microsoft.com/en-us/library/aa394525(v=vs.85).aspx

WMI Troubleshooting: The Repository on Vista / Server 2008
https://blogs.technet.com/b/askperf/archive/2008/07/11/wmi-troubleshooting-the-repository-on-vista-server-2008.aspx

Note: The blog above is titled for Windows 2008, but does apply to Windows 2012/2012R2 as well.

Shasank Prasad
Senior Support Escalation Engineer
Microsoft Corporation

Comments

  • Anonymous
    January 01, 2003
    The command is stuck at "Storing data in the repository" .. Can you suggest me what steps to perform in this case...
  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    February 03, 2014
    The comment has been removed
  • Anonymous
    February 11, 2014
    The comment has been removed
  • Anonymous
    June 11, 2014
    When I try to run the mofcomp.exe command, my server just hangs at "storing data in the repository" any idea why this is?
  • Anonymous
    March 11, 2015
    Same, says "Storing data in the repository" just hangs there..
  • Anonymous
    May 21, 2015
    The mofcomp.exe command generated the following output: Storing data in the repository... An error occurred while processing item 6 defined on lines 45 - 52 in file cluswmi.mof: Error code: 0xFFFFFFFF Compiler returned error 0xffffffff. However, it did seem to fix some type of WMI problem because the failover cluster manager was able to connect to the cluster on all nodes after running this command.
  • Anonymous
    September 17, 2015
    I got the same error An error occurred while processing item 6 defined on lines 45 - 52 in file cluswmi.mof: Error code: 0xFFFFFFFF Compiler returned error 0xffffffff...cluster console failed as well...
  • Anonymous
    September 17, 2015
    Problem resolved after running Winmgmt /resetrepository on the problematic cluster node.
    http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx
  • Anonymous
    January 20, 2017
    Thank you , worked perfectly
  • Anonymous
    April 06, 2017
    The comment has been removed
  • Anonymous
    May 25, 2017
    This worked! Thank you sir.
  • Anonymous
    December 06, 2018
    Saved my life a few seconds ago. Thanks!!