Hello Readers,
As per Previous article, i tried to explain configuration of Distributed Cache in SharePoint 2013 environment. Same follows for Sp2016 as well:Planning and Configuring Distributed Cache Service || Part 2
Today in current article will try to explain & correct the issue encountered with Distributed Cache Service. Sometime it happen that Distributed Cache service stuck in starting/Stopping mode in services on server page on SharePoint. If you open Manage Services on farm page in SharePoint 2016 , DS service can show Provisioning.
"It can be due to the issue of DS service on any of the server it is configured"
I will not go in detail of configuration as it is same for 2013 & 2016 and can be seen in previous article. So the question of day is "How to bring it back to Healthy state?"
Open Sharepoint Management Shell & check the status:
Get-SPServiceInstance | ? {($_.service.tostring()) -eq "SPDistributedCacheService Name=AppFabricCachingService"} | select Server, Id, Status
So if the service is showing starting/stopping on any of configured server in CA page you can get status here:
So if the the service is showing stopped on any of the running server, then it need to be corrected:"But before trying remove command" understand that there would surely be a job associated which need to be cleared first. else you will get the below error:
So get the details of job: name of the job instance you can get from above error or you can get id from the server id status
$job = get-sptimerjob job-service-instance-75e8dd26-0c3c-49a5-8378-xxxxxxxxxxxxx
$job
$job.delete()
Once the job is deleted you need to delete the service instance from the server it has issues:
$svc = Get-SPServiceInstance -id 75e8dd26-0c3c-49a5-8378-xxxxxxxxxxxx
$svc
$svc.delete()
Run the services instance command again and see if it get cleared:
Get-SPServiceInstance | ? {($_.service.tostring()) -eq "SPDistributedCacheService Name=AppFabricCachingService"} | select Server, Id, Status
Once it is cleared you need to add the service back on same server again as the same when in healthy state, use the below command without mentioning server name as it will start on the server as per cache cluster itself.
On SP Management shell execute the command: Add-SPDistributedCacheServiceInstance
Run the services instance command again and you will see the services is added back with status "Online" and the new "32 bit id will be associated":
Get-SPServiceInstance | ? {($_.service.tostring()) -eq "SPDistributedCacheService Name=AppFabricCachingService"} | select Server, Id, Status
"Now the DS service is back to Healthy state with status online on the servers where it is configured"
"You will find the status on Sp2016 Manage services in farm as "Disable Auto Provision" instead of Provisioning"
**If you want to check the cache host you can check by running below command in sequence:
Use-CacheCluster
Get-CacheHost
If you liked this post, do like on Facebook at : https://www.facebook.com/Ashishsharepointblog
Feel free to Rate and provide feedback if you find post useful
Ashi