Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 7025

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 2162

Deprecated: Hook imagify_allow_picture_tags_for_webp is deprecated since version 2.2! Use imagify_allow_picture_tags_for_nextgen instead. in /www/collab365_296/public/wp-includes/functions.php on line 5758
Repair corrupted SharePoint 2013 Distributed Cache cluster - Collab365
Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1145

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1152

Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1155

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1162

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www/collab365_296/public/wp-includes/functions.php on line 1165

Warning: Undefined array key "url" in /www/collab365_296/public/wp-content/plugins/thrive-visual-editor/thrive-dashboard/inc/smart-site/classes/class-tvd-smart-shortcodes.php on line 85

2014-03-14

Before you begin, please check if your SharePoint farm SQL servers are using Dynamic memory on ESX or Hyper-V. If yes – Turn it OFF! And check if it helped.

Launch AppFabric PowerShell console and execute:

Use-CacheCluster
Get-CacheHost

Check if Cluster is ‘UP’, If not then:

Start-CacheHost –ComputerName [yourServerName] –CachePort 22233

then get your SharePoint farm GUID

$spFarm=[Microsoft.SharePoint.Administration.SPfarm]::Local
$spFarm.Id

Export your current cluster configuration as backup. For reference and just in case..

Export-CacheClusterConfig c:\Backup.xml

Replace text in XML bellow:
YOUR-FARM-ID to your farm GUID,
CONTOSO\ClusterServiceAccount to your cluster service account,
SERVER1.COM to your cluster host.
Copy host section if you have multiple cluster hosts and change server name.
Change hostid like in Backup.xml and refer to other configuration details in this file.

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
        <section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    </configSections>
    <dataCache size="Medium">
        <caches partitionCount="256">
            <cache consistency="StrongConsistency" name="DistributedAccessCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedActivityFeedCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedActivityFeedLMTCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="None" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedBouncerCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedDefaultCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedLogonTokenCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedSearchCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedSecurityTrimmingCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedServerToAppServerAccessTokenCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
            <cache consistency="StrongConsistency" name="DistributedViewStateCache_YOUR-FARM-ID"
                minSecondaries="0">
                <policy>
                    <eviction type="Lru" />
                    <expiration defaultTTL="10" isExpirable="true" />
                </policy>
            </cache>
        </caches>
        <hosts>
            <host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
                hostId="280822625" size="1229" leadHost="true" account="CONTOSO\ClusterServiceAccount"
                cacheHostName="AppFabricCachingService" name="SERVER1.COM"
                cachePort="22233" />
        </hosts>
        <advancedProperties>
            <partitionStoreConnectionSettings leadHostManagement="false" />
            <securityProperties>
                <authorization>
                    <allow users="WSS_ADMIN_WPG" />
                    <allow users="WSS_WPG" />
                </authorization>
            </securityProperties>
        </advancedProperties>
        <deploymentSettings>
            <deploymentMode value="RoutingClient" />
        </deploymentSettings>
    </dataCache>
</configuration>

Save it to file c:\NewConfig.xml
Then stop cluster, import edited config file to cluster configuration and start it again:

Stop-CacheCluster
Import-CacheClusterConfig C:\NewConfig.xml
Start-CacheCluster

Then after several minutes try

Get-Cache

You should get:

CacheName            [Host]                      Regions
———————–
 default
 DistributedAccessCache_
 DistributedActivityFeedCache_
 DistributedActivityFeedLMTCache_
 ....
(Visited 790 times, 1 visits today)

About the author 

PauliusKe

Summit Bundle

Get 200+ hours of Microsoft 365 Training for 27$!

Master Office 365, Power Platform & SharePoint & Teams With 200+ Hours Of Training Videos and 108 Ebooks in the Collab365 Academy. This offer is insane and is only available for a limited period.