Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am attempting to remove a server as a cache host in my SharePoint 2013 environment.

Currently the service shows as Stopped on the server that I am attempting to remove from the cache cluster. I also am getting a warning in Central Administration stating:

This Distributed Cache host may cause cache reliability problems.

This Distributed Cache service on this Distributed Cache host has been stopped but not unregistered from the farm. In order to avoid reliability issues, it is recommended that a Distributed Cache host with a stopped Distributed Cache service be unregistered from the farm.

I run the command from PowerShell:

Remove-SPDistributedCacheServiceInstance

It errors out saying:

cacheHostInfo is null

Looking in the ULS logs I see this:

A failure occurred in SPDistributedCacheServiceInstance::UnprovisionInternal. cacheHostInfo is null for host 'server_name'.

When I open the AppFabric Server Configuration Wizard on the server it states:

This machine is not a member of an AppFabric Caching cluster.

I'm looking mainly to remove the service from that server since I have no plans of running the Distributed Cache on there anyways but I can't find my way around this error.

Any help would be appreciated.

share|improve this question

1 Answer 1

Using SharePoint Powershell

$SPFarm = Get-SPFarm
$cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString() 
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local 
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName); 
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}  
$serviceInstance.Delete()   

You may have to issue the Delete command a couple of times.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.