sharepoint-2013appfabricappfabric-cachedistributed-cachedatacachefactory

AppFabric unable to create a DataCache (LMTRepopulationJob FAILS)


Well first of all, I am learning sharepoint 2013 and I have been following a few tutorials, so far I just setup a farm and everything seems to be working properly except for this service that is being logged into the event viewer every 5 minutes:

The Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 1e573155-b7f6-441b-919b-53b2f05770f7) threw an exception. More information is included below.

Unexpected exception in FeedCacheService.BulkLMTUpdate: Unable to create a DataCache. SPDistributedCache is probably down..

I found out that this is a job that is configured to execute every 5 minutes

enter image description here

But regarding the assumption that the SPDistributedCache is probably down, I already verified it and it is running

enter image description here

enter image description here

As you can see, it is actually running, also I checked the host cache via SP powershell (get-cachehost and get-cacheclusterhealth) and still all seems fine

enter image description here

Yet when I execute the command get-cache I am getting only the default value, and for what I have read there should be listed another cache types like:

DistributedAccessCache_XXXXXXXXXXXXXXXXXXXXXXXXX DistributedBouncerCache_XXXXXXXXXXXXXXXXXXXXXXXX DistributedSearchCache_XXXXXXXXXXXXXXXXXXXXXXXXX DistributedServerToAppServerAccessTokenCache_XXXXXXX DistributedViewStateCache_XXXXXXXXXXXXXXXXXXXXXXX

Among others which I think probably should include DataCache

enter image description here

Until now I already tried a few workaround but without success

Restart-Service AppFabricCachingService
Remove-SPDistributedCacheServiceInstance
Add-SPDistributedCacheServiceInstance
Restart-CacheCluster

Even this script that it seems to work on many cases to repair the AppFabric Caching Service

$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}
$serviceInstance.Delete()
Add-SPDistributedCacheServiceInstance
$cacheClusterInfo.CacheHostsInfoCollection

Well if anyone has any suggestion, I will appreciate very much, thank you in advance!


Solution

  • This is a generic error message, meaning that the real issue isn't known (hence the word "Probably").

    I believe that the key to solving this problem when it is not the Probably , is in looking in the ULS log for the events that have occurred just before it. Events of type "Unexpected", do not appear in the events log and are often seen before a generaic type of error.

    In many cases you might see something like "File not Found". This usually means that the noted file is not in the assembly cache. Since the distributed Cache utilizes the AppFabric, which is outside of Sharepoint, then the only way for Sharepoint to find it's file, is to look in the assembly cache. The sharepoint pre Installer should have put the files there, but it might have failed or maybe someone uninstalled the App Fabric and re Installed it manually, which would have removed the files from the assembly and not put them back.