Distributed Cache in SharePoint 2013 -"Unexpected exception in FeedCacheService.IsRepopulationNeeded: Cache cluster is down, restart the cache cluster and Retry."


 

We had issue with Distributed Cache in SharePoint 2013

In ULS and event we were getting lots of errors related to Distributed cache.

 

Event ID:      6398
Task Category: Timer
Level:         Critical
Keywords:     
User:          xxxxxxxxxxx
Computer:      xxxxxxxxx
Description:
The Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID ba320718-0e80-4295-a3f8-a4badea59f0d) threw an exception. More information is included below.

Unexpected exception in FeedCacheService.IsRepopulationNeeded: Cache cluster is down, restart the cache cluster and Retry.

 

We ran following commands to fix the cache issue

Remove-SPDistributedCacheServiceInstance

 

$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()
}

After this we ran following command

$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
}

We ran Get-CacheHost and it shows the service is up

Made sure service is showing as started on the server


Comments (21)

  1. Same issue I am facing on all farm servers,Kindly let me know what is the impact on Production environment and how to run this script.

  2. Marcel says:

    I tried your solution and after the first script i get the error:

    You cannot call a method on a null-valued expression.

    At C:script.ps1:9 char:2

    +  $serviceInstance.Delete()

    +  ~~~~~~~~~~~~~~~~~~~~~~~~~

       + CategoryInfo          : InvalidOperation: (:) [], RuntimeException

       + FullyQualifiedErrorId : InvokeMethodOnNull

    any suggestion how i can fix this?

  3. Kirill says:

    I've got same error – You cannot call a method on a null-valued expression.

  4. yyyy says:

    http://www.dailymotion.com/video/x18uoiz_%D8%B4%D8%B1%D9%83%D8%A9-%D8%B1%D8%B4-%D9%85%D8%A8%D9%8A%D8%AF%D8%A7%D8%AA-%D8%A8%D8%A7%D9%84%D8%AE%D8%B1%D8%AC-0561933559-%D9%82%D9%85%D8%A9-%D8%A7%D9%84%D8%AA%D9%85%D9%8A%D8%B2_webcam
    http://www.dailymotion.com/video/x18unwb_%D8%B4%D8%B1%D9%83%D8%A9-%D8%AA%D9%86%D8%B8%D9%8A%D9%81-%D9%81%D9%84%D9%84-%D8%A8%D8%A7%D9%84%D8%AE%D8%A8%D8%B1-0561933559-%D9%82%D9%85%D8%A9-%D8%A7%D9%84%D8%AA%D9%85%D9%8A%D8%B2_webcam
    http://www.dailymotion.com/video/x18upda_%D8%B4%D8%B1%D9%83%D8%A9-%D9%85%D9%83%D8%A7%D9%81%D8%AD%D8%A9-%D8%AD%D8%B4%D8%B1%D8%A7%D8%AA-%D8%A8%D8%A7%D9%84%D8%AE%D8%B1%D8%AC-0561933559-%D9%82%D9%85%D8%A9-%D8%A7%D9%84%D8%AA%D9%85%D9%8A%D8%B2_webcam

    http://www.youtube.com/watch?v=cV9mPJxxu2M
    http://www.youtube.com/watch?v=nPSMvoXgssk&feature=youtu.be
    http://www.youtube.com/watch?v=voHN2GSJ_kQ&feature=youtu.be
    http://www.youtube.com/watch?v=ATcyMniEqxM&feature=youtu.be
    http://www.youtube.com/watch?v=nPA23aCm6po&feature=youtu.be
    http://www.youtube.com/watch?v=iAeuSnyeUAg&feature=youtu.be
    http://www.youtube.com/watch?v=T2PDPnkJUbE&feature=youtu.be
    http://www.youtube.com/watch?v=YlO6uBvQjDA&feature=youtu.be
    http://www.youtube.com/watch?v=VmoFEcOOn2Y&feature=youtu.be
    http://www.youtube.com/watch?v=1kL70SPgUyk&feature=youtu.be
    http://www.youtube.com/watch?v=Fmi1yu4mhQw&feature=youtu.be
    http://www.youtube.com/watch?v=r4wRjkQnEYk&feature=youtu.be
    http://www.youtube.com/watch?v=_cF4FhHNt3k&feature=youtu.be
    http://www.youtube.com/watch?v=6nS6f9whv1M&feature=youtu.be
    http://www.youtube.com/watch?v=D2tiHM4KT9I&feature=youtu.be
    http://www.youtube.com/watch?v=2Wn2H8v0rfQ&feature=youtu.b
    http://www.youtube.com/watch?v=8mhw8UJSjaI&feature=youtu.be
    http://www.youtube.com/watch?v=5AVIsD-qySQ
    http://www.youtube.com/watch?v=wKviffogNLE&feature=youtu.be
    http://www.youtube.com/watch?v=w5rslbfS1kc&feature=youtu.be
    http://www.youtube.com/watch?v=_Z-cDXwNaU4&feature=youtu.be

  5. dodo says:

    شات صوتي [www.f6h6.com] دردشة صوتية [http://www.f6h6.com] شات [http://www.f6h6.com] دردشة [http://www.f6h6.com] الشات صوتي [http://www.f6h6.com]
    الدردشة الصوتية [http://www.f6h6.com] الفاتن [http://www.f6h6.com] صوتي [http://www.f6h6.com] صوتية [http://www.f6h6.com]
    شات صوتي كام [http://www.f6h6.com] شات صوتي سعودي [http://www.f6h6.com] شات صوتي بنات [http://www.f6h6.com] شات [http://www.f6h6.com]
    دردشة [http://www.f6h6.com] صوتي الشات [http://www.f6h6.com]

    شات الخليج [http://www.khaaleg.com] دردشة الخليج [http://www.khaaleg.com] الخليج [http://www.khaaleg.com] شات [http://www.khaaleg.com]
    خليجي [http://www.khaaleg.com] الخليج [http://www.khaaleg.com] دردش الخليج [http://www.khaaleg.com] شات الخليج [http://www.khaaleg.com]
    دردشه الخليج [http://www.khaaleg.com]
    العاب طبخ [http://tabkhjeux.com] لعبة طبخ [http://tabkhjeux.com] العب طبخ [http://tabkhjeux.com] طبخ [http://tabkhjeux.com]
    طبخ العاب [http://tabkhjeux.com] العاب طبخ بنات [http://tabkhjeux.com]

    http://tabkhjeux.com العاب طبخ
    http://tabkhjeux.com لعبة طبخ
    http://tabkhjeux.com طبخ
    http://tabkhjeux.com العاب
    http://www.f6h6.com شات
    http://www.f6h6.com دردشة
    http://www.f6h6.com شات صوتي
    http://www.f6h6.com دردشة صوتية
    http://www.f6h6.com شات صوتي كام
    http://www.f6h6.com شات صوتي سعودي
    http://www.f6h6.com صوتية
    http://www.khaaleg.com شات الخليج
    http://www.khaaleg.com دردشة الخليج
    http://www.khaaleg.com الخليج
    http://www.khaaleg.com الخليج شات

  6. Fabio says:

    I think with the first If (when script delete the cache) condition to test need to be negative (if (not …)

  7. chat says:

    http://voice.7p-e.com/" title="شات صوتي" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/yag79172.gif" alt="شات صوتي" width="60" height="30">
    http://chat.7p-e.com/" title="شات كتابي" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/onq79172.gif" alt="شات كتابي" width="60" height="30">
    http://voice.7p-e.com/" title="دردشة صوتية" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/w6q79172.gif" alt="دردشة صوتية" width="60" height="30">
    http://voice.adma2.com/" title="شات صوتي" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/0qr79172.gif" alt="شات صوتي" width="60" height="30">
    http://www.7p-e.com/" title="حبي" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/4ah79172.gif" alt="حبي" width="60" height="30">
    http://www.7p-e.com/" title="شات حبي" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/bxk79172.gif" alt="شات حبي" width="60" height="30">
    http://www.3un.com/" title="دردشة" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/kby79588.gif" alt="دردشة" width="60" height="30">
    http://www.cambnat.com/" title="شات كام" rel="follow" target="_blank">
    http://up.al5oon.com/upfiles/gp379588.gif" alt="شات كام" width="60" height="30">

  8. xxxx says:

    شات صوتي دردشة صوتية شات حبي دردشة الحب

  9. eeee says:

    http://www.7p-e.com/" title="شات حبي" rel="dofollow">شات حبي

  10. Andrey Radomanov says:

    Невозможно вызвать метод для выражения со значением NULL.
    строка:3 знак:1
    + $serviceInstance.Delete()
    + ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

  11. Susan Barnes says:

    I was having the same issue. These commands fixed my issue:

    Use-CacheCluster
    Grant-CacheAllowedClientAccount -force

  12. Martin Riediger says:

    You could also use in an administrative Management Shell:

    Use-CacheCluster
    Restart-Cachecluster

    To verify everything is working check it with Get-CacheHost.

  13. Mukesh Murali says:

    I fixed the issue by running the below ones:-

    1. Run the below one to stop the service gracefully

    Stop-SPDistributedCacheServiceInstance -Graceful

    ***Wait for 5 minutes****

    2. Start the below one to restart the service:-

    $instance = Get-SPServiceInstance | ? {$_.TypeName -eq "Distributed Cache" -and $_.Server.Name -eq $env:computername}
    $instance.Provision()

    3. Manually check the status of App Fabric Caching service.

  14. Roy McCaw says:

    Fixed our DC issues using the following in PS:

    Stop-SPDistributedCacheServiceInstance -Graceful
    Remove-SPDistributedCacheServiceInstance
    Add-SPDistributedCacheServiceInstance

Skip to main content