Featured Post

Metadata Library View in SharePoint 2010

With SharePoint 2010 Managed Metadata was introduced as a new feature, but with all new features they have their limitations. One of the major limitations of using metadata in a library is that a metadata column filter cannot be applied to a term group but only to a single term. This is because a filter...

Read More

SharePoint distributed cache issues

Posted by andre | Posted in Distributed Cache, Installation & Configuration, SharePoint 2013 | Posted on 07-06-2013


Cache host info is null”  ”FeedCacheService.GetPublishedFeed: Object reference not set to an instance of an object” “The operation failed because the server could not access the distributed cache. Internal type name: Microsoft.Office.Server.Microfeed.MicrofeedException. Internal error code: 55

Have you installed SharePoint 2013 and have you seen any of the above notifications? Well good news, you are not the only one!

I’ve done numerous SharePoint installations for customers in the past months and every multiple-server configuration came with the same errors and none showed anything at the newsfeed.

After reading all the blogs about it I contacted Microsoft and we came to the following conclusions:

Don’t mix your distributed cache instance with your search services

Search can take up a lot of memory. Especially the memory distributed cache would like to use. If those two get into a fight about who’s going to use available memory cache might lose the fight and won’t be able to store the data. This way a wrongful entry could be made into the database and corruption is what follows.

Don’t fiddle with the AppFabric configuration

AppFabric is a Windows feature, distributed cache is a SharePoint cache layer based on top of AppFabric. Changing the AppFabric configuration, starting / stopping the service or changing the hosts in the cluster is not something a SharePoint admin should do. Adding or removing cache hosts should only be done with Remove- SPDistributedCacheServiceInstance and Add-SPDistributedCacheServiceInstance.
When all hope seems lost, start over!

After you’ve seen all the errors and reset all clusters and hosts, you’ll probably still get the same error. By recommendation from Microsoft: start over! Disconnect your servers from the farm and remove your databases.

How to configure

In a multiple server configuration you always start with setting up your main application server. In a basic set-up this server will host your Search, User Profile, etc. This is where the key to a successful configuration lies. After installing the SharePoint software and applying the March PU (KB767999) you want to configure your host without registering as a cachehost. Use the following PowerShell command to do so:

      New-SPConfigurationDatabase -DatabaseName [name] -DatabaseServer [server] -AdministrationContentDatabaseName [name] -Passphrase [passphrase] -


    -FarmCredentials [credentials]

The parameter “SkipRegisterAsDistributedCacheHost” prevents the server from becoming a distributed cache host.

After you complete your application server you connect your web front-end servers. By running the wizard your server automatically becomes a distributed cache host. In case you want to use dedicated cache hosts you can use the “SkipRegisterAsDistributedCacheHost” parameter when using the “Connect-SPConfigurationDatabase” command.

Configuring the User Profile Service

Now that your farm is ready you create a web application as your MySite host and you add a new User Profile Service service application.

Either you use an existing application pool or you create a new one, the account which is running your application pool needs to have “full control” connection permissions at the User Profile Service application.









Follow this blog to get this step done:

If all things are set correctly your newsfeed will now show the proper items!

At the servers configured as a cache host you can check the AppFabric configurion by running the following 2 commands in PowerShell:

    Use-CacheCluster followed by Get-CacheHost

Getting the status of your SharePoint Distributed Cache hosts is done by running

    Get-SPServiceInstance | where{$_.typename -like “*distributed*”}

The status on your DistributedCacheCluster is checked with:

    $SPFarm = Get-SPFarm
    $cacheClusterName = “SPDistributedCacheCluster_” + $SPFarm.Id.ToString()
    $cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
    $cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
    $cacheClusterInfo | fl *


Adding a cache host

If you want to add a SharePoint server as a cache host you run nothing else then: