Avoid common mistakes updating SharePoint Distributed Cache Service

Avoid common mistakes updating SharePoint Distributed Cache Service

A few months ago Wictor Wilen (@wictor) wrote a great blog post about how to properly patch the Distribute Cache Service. Even if I did it so many times I still look at Wictor’s post for reference every time I have to install software updates for DC.

In the past weeks I get into some issue that I think it could be useful to share. First, encoding. coping and pasting the following three line of configuration from the web page to the DistributedCacheService.exe.config file something went wrong with the encoding.

Unfortunately I did not notice it immediately but, when I tried to start the service using PowerShell, I got an error that said that my configuration file was not correct. Since than I always paste the code on notepad before adding it to the configuration file.

The second issue is still related to the DistributedCacheService.exe.config file. In Wictor’s post I think is pretty clear the position where you have to add the <appSettings> tag in the configuration file. This could be true for many but not for all since a customers called me saying that he was unable to make distributed cache working after the update. I noticed that he pasted the new tag just below the opening of <configuration> tag. This is not good and Event Viewer said it loudly.

Event Viewer

In this case I also noticed that the identity of the windows service “AppFabric Caching Service” did not match the account in the DistributedCacheService.exe.Config (see below). I think that someone tried to change the service account using Powershell but “Something went wrong” (I like this sentence :)).

This misconfiguration let to another error starting the Distributed Cache Service. Changing back the account to the windows service identity in the configuration file solved the issue.

Event Viewer

The last issue I want to talk is about starting the health state of the distributed cache service. More than one I noticed that running the following cmdlets everything seems to be ok. With “ok” I mean that in the Status column I can see online.

But when I tried to get the host information of the Distributed Cache Host running the following cmdlets I got different results.”Different results” is bad, because in the Service status column I found DOWN, so I had to stop the service, remove the service instance and add it again.

My best advice when you update the distributed cache is to double check the status of the service using both commands.

– Riccardo

Submit a Comment