More Cache hosts are running in this deployment than are registered with SharePoint.

Hi All,

I am receiving this message in our Health Reports on a new SP 2013 farm deployment. I previously was having some issues with the Distributed Cache service and undeployed it from one server. When I launch PowerShell and specify "Get-CacheHost" I only get one result and its the only CacheHost in the farm. 

This is coincidentally the same server that CA is complaining about:

HostName : CachePort                   Service Name            Service Status V
                                                                              e
                                                                              r
                                                                              s
                                                                              i
                                                                              o
                                                                              n

                                                                              I
                                                                              n
                                                                              f
                                                                              o
--------------------                   ------------            -------------- -
SERVER.DOMAIN.COM:22233 AppFabricCachingService UP             3

                                                                              [
                                                                              3
                                                                              ,
                                                                              3
                                                                              ]
                                                                              [
                                                                              1
                                                                              ,
                                                                              3
                                                                              ]

Explanation

More Cache hosts are running in this deployment than are registered with SharePoint.

Remedy

More Cache hosts are running in this deployment than are registered with SharePoint. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=224263".

Failing Servers

SERVER

I guess my question is, if there is only 1 cache host running then how are there "More" cache hosts running than registered. Is there somewhere else they are registered?

I checked the CacheConfig XML and there is only 1 host under the <hosts> section.

Thanks for any help you can provide.

Matt

August 18th, 2015 9:01am

Execute also this command

$Farm = Get-SPFarm

$cacheClusterName = SPDistributedCacheCluster_ + $Farm.Id.ToString()

$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local

$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName)

$cacheClusterInfo

$cacheClusterInfo.CacheHostsInfoCollection | fl

and this query

SELECT * FROM [SharePoint_Config].[dbo].[CacheClusterConfig] where [EntryType] like %hosts%

What is the number of servers that is returned?

Free Windows Admin Tool Kit Click here and download it now
August 18th, 2015 11:12am

For the PowerShell part I actually see two, the old one with a CacheHostStatus of "DOWN" and the current one with "UP"

The SQL query only actually returns the correct one.

How do I cleanly remove the old one from the CacheClusterInfo ?

Thanks for you help.

Matt

August 18th, 2015 1:53pm

Is the other server that is down in the SP farm?

If yes,execute the following commands on the server that you want to remove

Stop-SPDistributedCacheServiceInstance -Graceful

Remove-SPDistributedCacheServiceInstance

and then 

Stop-CacheCluster

Start-CacheCluster

Free Windows Admin Tool Kit Click here and download it now
August 18th, 2015 2:11pm

The server that is down is in the farm, however, that first command does not work. It's almost as if the service is not aware that its part of the cluster.

Stop-SPDistributedCacheServiceInstance : cacheServiceInstance not found.
At line:1 char:1
+ Stop-SPDistributedCacheServiceInstance -Graceful
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Share...lyOnLocalServ
   er:SPCmdletStopDis...lyOnLocalServer) [Stop-SPDistributedCacheServiceInsta
  nce], InvalidOperationException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletStopDist
   ributedCacheServiceInstanceGracefullyOnLocalServer

Stopping / Restarting the cluster just brings back up the one server in the cluster with no mention of anything else.

Strange that the cachehostinfocollection lists both servers. Is there a way to manually clean up that information?

August 18th, 2015 2:46pm

you can try to unprovision the service on this server 

$instanceName =SPDistributedCacheService Name=AppFabricCachingService

$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}

$serviceInstance.Unprovision()

and then you can delete the instance if you still have it in the results

Get-SPServiceInstance | fl TypeName, ID

$s = Get-SPServiceInstance ID

$s.delete()

this command can fix the issue but it can generate also orphan items in config db. As the server is not referenced in the config db as cachehost it should work.

Free Windows Admin Tool Kit Click here and download it now
August 18th, 2015 3:08pm

Appreciate the help but that doesn't seem to work. I'm going to chalk this up to a bug in 2013.

I took your previous PS command a step further---

When I previously listed $cacheClusterInfo.CacheHostsInfoCollection | fl  --- I would get two hostnames listed, the DOWN and the UP server in the cluster.

I ran: 

$badcache= $cacheClusterInfo.CacheHostsInfoCollection | Where-Object {$_.HostName -eq "NAUGHTYSERVER"}

$badcache.Delete()

When I reran the $cacheClusterInfo command I only get the "UP" host, yet the Central Admin health rule still persists.

The "UP" host is working, this rule is simply an annoyance at this point (I'm going to disable the rule). I assume the real fix would be to remove my cluster and rebuild it but as this is a test environment its not a huge deal for me.

August 18th, 2015 3:48pm

if it is test execute this action plan to see if it will remove your host

a. Export-CacheClusterConfig Path c:\config.xml

b. Remove the host

Usual output would look like this for one cache host in the cluster:

<hosts>

<host replicationPort=22236 arbitrationPort=22235 clusterPort=22234

hostId=id size=400 leadHost=true account=domain\account

cacheHostName=AppFabricCachingService name=servername.domain.local

cachePort=22233 />

</hosts>

c. Stop-cachecluster

d. Import-cacheclusterconfig file path\file.xml

e. Start-cachecluster


Free Windows Admin Tool Kit Click here and download it now
August 18th, 2015 3:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics