Wednesday, February 18, 2015

SharePoint 2013: This Distributed Cache host may cause cache reliability problems

Problem

You added a new web front end server to the farm.  Subsequently, you see the following report in the farm's All Reports listing:

TitleThis Distributed Cache host may cause cache reliability problems.
Severity2 - Warning
CategoryConfiguration
ExplanationThis 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
RemedyUnregistered cache hosts using PowerShell. For more information about this rule, see
http://go.microsoft.com/fwlink/?LinkID=3136960".
Failing Servers[new WFE]
Failing ServicesSPTimerService (SPTimerV4)
Rule SettingsView
 
Solution
  1. Ensure ShellAdmin Access
    1. Login to the WFE using the SharePoint Setup User Administrator account (eg, spAdmin).
    2. On the WFE, launch an elevated SharePoint Management Shell.
    3. Execute the following command:
      Get-SPShellAdmin
      This checks the farm configuration database for those users who can modify it.
    4. Verify that the SharePoint Setup User Administrator account has been added.  If it isn't, make it so.
  2. Get Service Instance ID
    1. Login to the WFE using the SharePoint Setup User Administrator account (eg, spAdmin).
    2. On the WFE, launch an elevated SharePoint Management Shell.
    3. Execute the following command:
      Get-SPServiceInstance | Where-Object {$_.Server -Like "*<yourWFE>*"} | Select-Object TypeName, ID, Status | Sort-Object TypeName
      This generates a listing of SharePoint-related service instances on the machine, including their IDs and statuses, sorted.
    4. Look for Distributed Cache in this listing.
    5. Copy its ID.
  3. Delete Service Instance
    1. In the same management shell, execute the following command:
      (Get-SPServiceInstance <yourWFE-ID>).delete()
      If you now re-execute the command in step 2.3, above, you will no longer see it listed.  However, if you should now re-analyze the rule, it still remains. And if you check the server services control panel, you will see that the AppFabric Caching Service status remains Running.  
  4. Remove Service Instance
    1. In the same management shell, execute the following command:
      Remove-SPDistributedCacheServiceInstance
  5. Re-analyze Rule Violation Problem
    1. In Central Administration, navigate to the Review problems and solutions page.
    2. Click on the item, This Distributed Cache host may cause cache reliability problems.
    3. Click the Re-analyze button.
References
  1. Initial deployment administrative and service accounts in SharePoint 2013
  2. This Distributed Cache host may cause cache reliability problems (SharePoint 2013)
  3. Managing Windows Server AppFabric Caching Features
  4. SharePoint 2013: how to remove a cache host from an unrecoverable farm server
  5. SharePoint Setup User Administrator
  6. Get-SPShellAdmin
  7. Get-SPServiceInstance
  8. Remove-SPDistributedCacheServiceInstance
  9. SharePoint 2013 Distributed Cache: Boon or Bane
Notes
  • I tried the process in the Microsoft TechNet article cited above (2); however, this failed to resolve the problem.
  • You could of course stop the AppFabric Caching Service service using the server Services panel, but this is not recommended. I've tried this myself without success.  I then used the PowerShell command, above, and this worked.

2 comments:

PeaceBeUponYou said...

Hi Al - I was able to sort out most of my issues with Distributed Cache Host with your guide except one. Hoping you can shed some light. Health Analyzer failing on a non-existent server. Since that server does not exist Get-SPServiceInstance PS command not returning anything. "Unregister-CacheHost" fails with "No such host is known". Any suggestion how can I remove this. Tried doing multiple "ReAnalyze" with no luck.

Host names match through Get-ServiceInstance and Get-CacheHost commands. That non-existent server does not show up in these lists.Not sure where Health Analyzer picking that name from. That server used to exist at one point but decommissioned long time ago. :-(

Appreciate any feedback!

Al said...

See this article SharePoint 2013: how to remove a cache host from an unrecoverable farm server. Try out these steps and then let me know what occurs.