none
Distributed Cache service stuck in Starting Provisioning

    Question

  • Hello,

    I'm having problem with starting/stopping Distributed Cache service in one of the SharePoint 2013 farm servers. Initially, Distributed Cache was enabled in all the farm servers by default and it was running as a cluster. I wanted to remove it from all hosts but one (APP server) using below PowerShell commands, which worked fine.

    Stop-SPDistributedCacheServiceInstance -Graceful
    Remove-SPDistributedCacheServiceInstance

    But later I attempted to add the service back to two hosts (WFE servers) using below command and unfortunately one of them got stuck in the process. When I look at the Services on Server from Central Admin, the status says "Starting".

    Add-SPDistributedCacheServiceInstance

    Also, when I execute below script, the status says "Provisioning".

    Get-SPServiceInstance | ? {($_.service.tostring()) -eq "SPDistributedCacheService Name=AppFabricCachingService"} | select Server, Status

    I get "cacheHostInfo is null" error when I use "Stop-SPDistributedCacheServiceInstance -Graceful".

    I tried below script,

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

    ,but it didn't work either, and I got below error.

    "SPDistributedCacheServiceInstance", could not be deleted because other objects depend on it.  Update all of these dependants to point to null or 
    different objects and retry this operation.  The dependant objects are as follows: 
    SPServiceInstanceJobDefinition Name=job-service-instance-{GUID}

    Has anyone come across this issue? I would appreciate any help.

    Thanks!

    • Edited by rdoe777 Tuesday, June 03, 2014 2:16 PM
    Monday, June 02, 2014 8:32 PM

Answers

  • SharePoint RTM is not supported. Install SP1. Just install CU5 for AppFabric. I would not troubleshoot before doing these two items.

    Trevor Seward

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Saturday, June 07, 2014 12:07 AM
    Moderator

All replies

  • Hi  ,

    According to your description, you had removed the Distributed Cache Service Instance, so you cannot get the Distributed Cache Service Instance using Get-SPServiceInstance cmdlet.

    To rejoin or add the server to the cache cluster, you need to run the Add-SPDistributedCacheServiceInstance cmdlet:

    For more information, please refer to the article:

    http://technet.microsoft.com/en-us/library/jj219613(v=office.15).aspx

    Thanks,

    Eric

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Eric Tao
    TechNet Community Support

    Tuesday, June 03, 2014 8:00 AM
  • It got stuck in Starting (Provisioning) after I ran Add-SPDistributedCacheServiceInstance. I forgot to add this command when I wrote "to add the service back to two hosts (WFE servers) using below command". Updated it just now, sorry.


    • Edited by rdoe777 Tuesday, June 03, 2014 6:27 PM
    Tuesday, June 03, 2014 12:01 PM
  • I was able to get rid of the service from WFE server, but I cannot add the service back. I did below to get rid of it. 

    1. Got the service instance Id on the WFE where it got stuck using script first. 

    Get-SPServiceInstance -Server $ServerName | ? {($_.service.tostring()) -eq "SPDistributedCacheService Name=AppFabricCachingService"} | select Server, Id, Status

    2. Stopped the service using command.

    Stop-SPServiceInstance -Identity $Id

    3. After this, the Distributed Cache got stuck in "Stopping". I ran below command and it disappeared from the cluster.

    Remove-SPDistributedCacheServiceInstance

    Now, I can't add it back using Add-SPDistributedCacheServiceInstance. It just doesn't work, no errors are thrown when I run it.


    • Edited by rdoe777 Thursday, June 05, 2014 11:55 AM
    Wednesday, June 04, 2014 7:06 PM
  • Hi ,

    Are you able to ping the server that is already running Distributed Cache on this server? For example:

    ping WFE01

    As you are using more than one cache host in your server farm, you must configure the first cache host running the Distributed Cache service to allow Inbound ICMP (ICMPv4) traffic through the firewall.If an administrator removes the first cache host from the cluster which was configured to allow Inbound ICMP (ICMPv4) traffic through the firewall, you must configure the first server of the new cluster to allow Inbound ICMP (ICMPv4) traffic through the firewall. 

    You can create a rule to allow the incoming port.

    For more information, you can refer to the  blog:

    http://habaneroconsulting.com/insights/Distributed-Cache-Needs-Ping#.U4_nmPm1a3A

    Thanks,

    Eric

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Eric Tao
    TechNet Community Support

    Thursday, June 05, 2014 5:46 AM
  • Hi Eric, 

    Unfortunately, all 4 servers (2 WFEs and 2 APPs) are pinging each other fine. Also, the Firewall is turned off in all of the servers.

    There should be something wrong with the WFE server where I want to add back Distributed Cache, but I don't know what.

    Thanks,


    Friday, June 06, 2014 8:07 PM
  • Have you installed CU5 for AppFabric?

    http://www.microsoft.com/en-ph/download/details.aspx?id=42281


    Trevor Seward

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Friday, June 06, 2014 9:20 PM
    Moderator
  • Hi Trevor,

    We have only CU1 installed for AppFabric. SharePoint is RTM version 15.0.4420.1017. I know both are outdated.

    Should I install CU2-CU4 before installing CU5?

    Thanks,

    Friday, June 06, 2014 10:33 PM
  • I noticed just now that it says "This machine is a member of an AppFabric Caching cluster." when I launch Configure AppFabric and click Next on WFE server where I removed it already. It doesn't list the server when I run Use-CacheCluster > Get-CacheHost.
    • Edited by rdoe777 Friday, June 06, 2014 10:47 PM
    Friday, June 06, 2014 10:46 PM
  • SharePoint RTM is not supported. Install SP1. Just install CU5 for AppFabric. I would not troubleshoot before doing these two items.

    Trevor Seward

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Saturday, June 07, 2014 12:07 AM
    Moderator
  • Checkout this blog , Most of the issues and resolutions are listed here

    http://sharepointjournal.com/2014/08/19/sharepoint-2013-distributed-cache-boon-or-bane/

    Tuesday, August 19, 2014 11:04 PM
  • Checkout this blog , Most of the issues and resolutions are listed here

    http://sharepointjournal.com/2014/08/19/sharepoint-2013-distributed-cache-boon-or-bane/

    Tuesday, August 19, 2014 11:05 PM