SharePoint Event-ID 2137 and 6398 How to fix

The error is the following one with Event ID 2137 Health:

The SharePoint Health Analyzer detected an error.  Distributed cache service is not enabled in this deployment.
Distributed cache service is not running in this deployment.
Turn on the Distributed cache service. For more information about this rule, see “http://go.microsoft.com/fwlink/?LinkID=262656“.

I found a solution here: http://technet.microsoft.com/en-us/library/jj891121.aspx

But i did some more steps cause my CacheHost was null. You can check it by using Powershell with Get-CacheHost.

So i ran this powershell which i found here:

[sourcecode language=”csharp”]

Remove-SPDistributedCacheServiceInstance

#first Delete
$SPFarm = Get-SPFarm
$cacheClusterName = “SPDistributedCacheCluster_” + $SPFarm.Id.ToString()
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}
if([System.String]::IsNullOrEmpty($cacheClusterInfo.CacheHostsInfoCollection))
{
$serviceInstance.Delete()
}

#then create new

$SPFarm = Get-SPFarm
$cacheClusterName = “SPDistributedCacheCluster_” + $SPFarm.Id.ToString()
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}
if([System.String]::IsNullOrEmpty($cacheClusterInfo.CacheHostsInfoCollection))
{

Add-SPDistributedCacheServiceInstance
$cacheClusterInfo.CacheHostsInfoCollection
}

[/sourcecode]

It often has also to do with the Event ID 6398:

The Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 1fcb7a10-9764-45e2-b9bf-c00760c52081) threw an exception. More information is included below.
Unexpected exception in FeedCacheService.IsRepopulationNeeded: Unable to create a DataCache. SPDistributedCache is probably down.

I found also the same situation here.

After that the errors disappeared. Hope it helps you.

The article or information provided here represents completely my own personal view & thought. It is recommended to test the content or scripts of the site in the lab, before making use in the production environment & use it completely at your own risk. The articles, scripts, suggestions or tricks published on the site are provided AS-IS with no warranties or guarantees and confers no rights.

About Karsten Schneider 312 Articles
Consultant for Microsoft 365 Applications with a strong focus in Teams, SharePoint Online, OneDrive for Business as well as PowerPlatform with PowerApps, Flow and PowerBI. I provide Workshops for Governance & Security in Office 365 and Development of Solutions in the area of Collaboration and Teamwork based on Microsoft 365 and Azure Cloud Solutions. In his free time he tries to collect tipps and worthy experience in this blog.

1 Comment

1 Trackback / Pingback

  1. Distributed Cache service won’t start / stuck / erroring | Insight Technologies

Leave a Reply to Lou Garcia Cancel reply

Your email address will not be published.


*