Unable to remove SharePoint server from Farm – “cacheHostInfo is null”

I was creating a new farm from an existing farm due to project requirements, but I came across a situation wherein I was not able to remove the server from the farm using the SharePoint 2013 UI(server was already removed using the command or you can remove it by using configuration wizard on the server to be removed).

So, the error message which I was getting when I was trying to remove the server from the UI was “cacheHostInfo is null“.

Below is the solution to this problem which I followed and it worked.

remove-server

The above-mentioned server was already removed using PowerShell command. But when we try to remove it using the UI it gave the error “cacheHostInfo is null”. So, I ran the following command to get the service instance for Distributed Cache of the server which was removed. After getting the Service instance, I deleted it using PowerShell.

#Getting the service instance for the server to be removed
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$si = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and $_.server.name -eq "<ServerNameToBeRemoved>" }

#remove the service instance
$si.Delete()

Now, I tried to remove the server from the Central Administration it worked. Thank you for visiting my blog. Hope it would help you!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s