Tag Archives: Error

Problems creating Windows Cluster through Powershell

Creating a Windows Cluster is surprisingly easy, but every now and again you run into small problems which irritate and are not really helped by the error messages – a problem which is exacerbated by the do all in one go power of PowerShell.

One such problem is when you use the New-Cluster command to add all your nodes in one go.

New-Cluster -Name magrathea -node server5,server6,server7 

Simple right? Well no. In this instance I ran into the following error:

New-Cluster : There was an error adding node 'server7' to the cluster

the node cannot be contacted. Ensure that the node is powered on and is connected to the network.

At line:1 char:1

+ New-Cluster -Name magrathea -node server5,server6,server7 -staticaddress ...

+ ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜

+ CategoryInfo : ConnectionError: (:) [New-Cluster], ClusterCmdletException

+ FullyQualifiedErrorId : ClusterNodeNotReachable,Microsoft.FailoverClusters.PowerShell.NewClusterCommand

Ok, so the problem is obvious, isn’t it? You have misconfigured the node IP address, Firewall is blocking, or even Remote Administration is disabled. Let’s create the Cluster with only server5 and server6 and then try adding server7:

Add-ClusterNode : Failed to access remote registry on 'server7.hitchhikers.galaxy'.  Ensure that the remote registry
service is running, and have remote administration enabled.
    The network path was not found.
At line:1 char:1
+ Add-ClusterNode -Name server7 -Cluster magrathea
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-ClusterNode], ClusterCmdletException
    + FullyQualifiedErrorId : Add-ClusterNode,Microsoft.FailoverClusters.PowerShell.AddClusterNodeCommand

The error message is even more damming this time, and it is fairly clear you must have forgotten to enable remote administration -except you haven’t. In fact, nothing seems wrongly configured with the node and everything looks identical to server5 and server6.

This time you decide to try adding the node directly from the problem server itself:

Add-ClusterNode : The term 'Add-ClusterNode' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
At line:1 char:1
+ Add-ClusterNode -Name server7 -Cluster magrathea
+ ~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Add-ClusterNode:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Finally, all becomes clear! This time the error message fails, stating that the Add-ClusterNode cmdlet is not available and it is obvious that you have forgotten to install the Failover-Clustering feature on this node (doh!).

Get-WindowsFeature Failover-Clustering|Add-WindowsFeature

Once installed, it is time to try again…

Add-ClusterNode -Name server7 -Cluster magrathea


The moral of this story is that error messages are misleading, so when dealing with something as (potentially) complex as a Windows Cluster, it is always useful to break operations down into small fragments in order to understand the real reason for failure.