none
Delete Cache Host, SharePoint 2013

    Question

  • Hi All,

    I had a SharePoint 2013 farm with two WFE servers. Both hosting Central Admin. Both servers were part of Distributed Cache host.

    But last week, we remove one of the servers from the farm permanently. I followed following procedure:

    1) Stop all services on the server which was to be removed.

    2) Uninstalled SharePoint from that server.

    Our single server farm is working all right now but using the command "Get-CacheHost" is still showing both the servers (Removed server is having status "Down").

    I tried every command from the google search example - Unregister-AFCacheHost, Unregister-CacheHost, Remove-CacheHost, Remove-SPDistributedCacheServiceInstance etc. but unable to delete the removed server Host name from App Fabric Cache Host list. Firing Add-SPDistributedCacheServiceInstance brings it back.

    Please suggest.


    • Edited by Matheyo Tuesday, July 02, 2013 11:59 PM change
    Tuesday, July 02, 2013 11:35 PM

Answers

  • I resolved the issue my self. I was using wrong provider and connection string for removing Cache Host.

    So I used:

    Unregister-CacheHost -HostName <servername>

    Provider Type : SPDistributedCacheClusterProvider

    I got provider type and connection string information from Registery Path - "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppFabric\V1.0\Configuration"

    • Marked as answer by Matheyo Wednesday, July 03, 2013 10:05 AM
    Wednesday, July 03, 2013 10:05 AM

All replies

  • Have you run SharePoint 2013 Product configuration wizard to disconnect the server from the farm before uninstall? You should have disconnect the server from the farm first.

    >>Get-CacheHost" is still showing both the servers (Removed server is having status "Down"). I see the same after i stop Distributed Cache service from Service on servers in Central Administration.

    I see what follows from http://blogs.msdn.com/b/besidethepoint/archive/2013/03/27/appfabric-caching-and-sharepoint-2.aspx , however, i had not find anything abnormal because i stop the service from CA yet:

    Unlike other service instances, though, the Distributed Cache Service Instance should either be installed *and* online on a SharePoint server, or not installed at all. If the service instance is stopped (disabled) but not uninstalled, details about the associated Cache Host stay in the Cache Cluster Config store, which can cause problems

    Wednesday, July 03, 2013 5:42 AM
    Moderator
  • You are right, as per MSDN article about removing server from Farm, I just uninstalled it without running configuration Wizard. This step was documented no where on MSDN :(

    Now the cluster host is empty (has no guid service inside it) but shows up in Get-CacheHost.

    Do I need to lock call with Microsoft to get resolution?

    Wednesday, July 03, 2013 9:42 AM
  • I resolved the issue my self. I was using wrong provider and connection string for removing Cache Host.

    So I used:

    Unregister-CacheHost -HostName <servername>

    Provider Type : SPDistributedCacheClusterProvider

    I got provider type and connection string information from Registery Path - "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppFabric\V1.0\Configuration"

    • Marked as answer by Matheyo Wednesday, July 03, 2013 10:05 AM
    Wednesday, July 03, 2013 10:05 AM
  • This actually works! Great Post!

    In my case I needed to add the -ConnectionString property as well, to make everything work. 

    Unregister-CacheHost -HostName <ServerName> -ProviderType "SPDistributedCacheClusterProvider" –ConnectionString "Data Source=<Database ServerName>;Initial Catalog=<Config_DB>;Integrated Security=True;Enlist=False"

    Supply your own <ServerName>, <Database ServerName> and <Config_DB>



    BennySkogberg

    Thursday, January 14, 2016 9:14 AM