다음을 통해 공유


SharePoint 2013: Cannot Remove Server from Farm: cacheHostInfo is Null

Problem: Customer was trying to remove a server from the farm via the ‘Remove Server’ link in Central Administration. Every time they would try this, they would receive an error that said ‘cacheHostInfo is Null’

Troubleshooting:

  • Right away, from experience, I knew this had to do with improper removal of a server from a farm that is running Distribution Cache service. But to verify I asked to look at the ‘Services in this Farm’ page. Then we tried trying to turn that service off on the problem server but it also failed with same error cacheHostInfo is Null

Resolution

  • Login to your server with your setup account (Whats a setup account?)

  • Launch SharePoint Powershell (Run as Administrator)

  • Run this command: Get-spserviceinstance | where{$_.parent -match "name_of_server_you_removed"}

  • You’ll see something like this, you want to copy the ID:

    TypeName : Distributed Cache
                DisplayName : Distributed Cache Service Instance
                Description : Distributed cache service to store the cached items in memory.
                Server : SPServer Name=MySPServer
                Service : SPDistributedCacheService Name=AppFabricCachingService
                Instance :
                Roles :
                Hidden : False
                SystemService : False
                ManageLink : Microsoft.SharePoint.Administration.SPActionLink
                ProvisionLink : Microsoft.SharePoint.Administration.SPActionLink
                UnprovisionLink : Microsoft.SharePoint.Administration.SPActionLink
                CanUpgrade : False
                IsBackwardsCompatible : True
                NeedsUpgradeIncludeChildren : True
                NeedsUpgrade : True
                UpgradeContext : Microsoft.SharePoint.Upgrade.SPUpgradeContext
                Name :
                Id : 62d294e4-b7ez-4cd7-9btt-384c98574e2f
                Status : Disabled
                Parent : SPServer Name=MySPServer
                Version : 8576
                Properties : {}
                Farm : SPFarm Name=SharePoint_Config_2013
                UpgradedPersistedProperties : {}

  • $instance = get-spserviceinstance 62d294e4-b7ez-4cd7-9btt-384c98574e2f

  • $instance.Unprovision()
    (it may fail with the same cacheHostInfo is Null so try this command:
    $instance.Delete()

  • After it completes successfully, you can then go into Central Admin >>Manage Servers in this Farm and click the ‘Remove Server’ link to remove your server

Stay tuned for an article on How to Properly Remove a Server running Distribution Cache from your Farm.

Comments

  • Anonymous
    January 01, 2003
    Removal of a server from a farm that is running Distribution Cache service is one thing, but learning how to do it is another. This is a very well set up instructions/plan on how to carefully manage/remove a server. I like how you included that someone should login with their setup account and to launch from SharePoint PowerShell. These are the bases of any problem and to have the distributed cache, just in case someone one would need an example to create/remove something like this.
  • Anonymous
    April 22, 2015
    Thank you!! This worked for me
  • Anonymous
    June 24, 2015
    Thanks Sal - that was helpful!

    Even though I removed a server through SPCW and Distributed Cache showed 'stopped' (post removal) I ran into the same issue you described. Deleting distributed cache instance through PS resolved my issue. I suppose I should have manually disabled the 'distributed cache' service before running SPCW? I wonder why the Wizard did not take care of this, bug? :-)
  • Anonymous
    October 27, 2015
    Thanks! This help me a Lot!
  • Anonymous
    September 01, 2016
    Many thanks, this worked for me..