SharePoint 2016 – Resolving exception – SPDistributedCachePointerWrapper::InitializeDataCacheFactory – No cache hosts are present in the farm Unexpected Exception in SPDistributedCachePointerWrapper:’DistributedLogonTokenCache’ – Exception ‘System.InvalidOperationException’
Hi All,
Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂
SharePoint Migration continues 🙂 Today new issue and solution
Details:
- We have migrated our SharePoint 2013 application to SharePoint 2016
- We had successful migration
- There were some issue in opening few pages so started digging into ULS logs
- In logs found that, logs are flooded with error related to Distributed Cache Service
Error – Distributed Cache exception in SharePoint log
SPDistributedCachePointerWrapper::InitializeDataCacheFactory – No cache hosts are present in the farm.
06/03/2021 01:26:47.38 w3wp.exe (0x1868) 0x2260 SharePoint Foundation DistributedCache ah24w Unexpected Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage ‘DistributedLogonTokenCache’ – Exception ‘System.InvalidOperationException: SPDistributedCachePointerWrapper::InitializeDataCacheFactory – No cache hosts present in the farm. at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()’.
06/03/2021 01:26:47.38 w3wp.exe (0x1868) 0x2260 SharePoint Foundation DistributedCache air4g Monitorable Token Cache: Failed to initialize SPDistributedSecurityTokenCache Exception: ‘System.InvalidOperationException: SPDistributedCachePointerWrapper::InitializeDataCacheFactory – No cache hosts present in the farm. at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory() at Microsoft.SharePoint.DistributedCaching.SPDistributedCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encryptData) at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encrptyData, TimeSpan minimumTokenExpirationWindow) at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCacheInitializer…
Issue :
- While preparing SharePoint server, we have missed the configuring Distributed Cache Service on WFEs
- Distributed cache service is not registered
- We were not able to see the “Distributed Cache service” listed on the “Service on Server”page in Central Administration
Solution : We need to Add a WFEs to the cache cluster and starting the Distributed Cache service by using SharePoint Management Shell
- Start the SharePoint Management Shell on WFE which we need to add to cache-cluster
- Execute the following CMDLET
Add-SPDistributedCacheServiceInstance
What is Distributed Cache Service :
- Distributed Cache service provides caching functionality for following features
- Authentication
- Newsfeeds
- OneNote client access
- Security Trimming
- Page load performance
- For more details please have a look at references at reference section
Reference :
- https://docs.microsoft.com/en-us/SharePoint/administration/manage-the-distributed-cache-service?redirectedfrom=MSDN
- https://technet2.github.io/Wiki/articles/20348.sharepoint-2013-appfabric-and-distributed-cache-service.html
Thanks for reading 🙂 If its worth at least reading once, kindly please like and share 🙂 SHARING IS CARING 🙂
Enjoy the beautiful life 🙂 Have a FUN 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂
You must log in to post a comment.