Monday, June 27, 2016

SharePoint 2013: The operation failed because the server could not access the distributed cache

Problem

You navigate to your My Site, click on Newsfeed, and then select Following: nothing appears - this after specifically and successfully selecting several items for following.  You then navigate back to your My Site, click on Newsfeed, and then click on Everyone.  You then see the following error message appear on this page:
There was a problem retrieving the latest activity. Please try again later.

Technical Details

SharePoint returned the following error: The operation failed because the server could not access the distributed cache. Internal type name: Microsoft.Office.Server.Microfeed.MicrofeedException. Internal error code: 55. Contact your system administrator for help in resolving this problem.

You then commence troubleshooting.

Troubleshooting

  1. Verify Repeatability: "followed" some additional items; returned to Newsfeed page; and then clicked Everyone: experienced same error. Repeated process again with same result.
  2. Research: searched on error message text: found Microsoft TechNet blog posting.
  3. Review ULS: triggered issue again, noting time.  Then checked ULS logs on WFEs. Found on first WFE checked.  Found series of 41 entries, from process initiation to closure.  Some examples:
    Unable to write service call usage entry.
     
    MossClientBase_WCFLogging:: MossClientBase.ExecuteOnChannel - Unrecognized exception: System.ServiceModel.FaultException`1[Microsoft.Office.Server.UserProfiles.FeedCacheFault]: Unexpected exception in FeedCacheService.GetPublishedFeed: Object reference not set to an instance of an object.. (Fault Detail is equal to Microsoft.Office.Server.UserProfiles.FeedCacheFault).

    Exception occured in ExecuteOnChannel: System.ServiceModel.FaultException`1[Microsoft.Office.Server.UserProfiles.FeedCacheFault]: Unexpected exception in FeedCacheService.GetPublishedFeed: Object reference not set to an instance of an object.. (Fault Detail is equal to Microsoft.Office.Server.UserProfiles.FeedCacheFault).

    There were many examples like these. However, the one that seemed more informative was this one (see highlighted):

    Microsoft.Office.Server.Social.SPSocialFeedManager.GetFeed: Microsoft.Office.Server.Social.SPSocialException: The operation failed because the server could not access the distributed cache. Internal type name: Microsoft.Office.Server.Microfeed.MicrofeedException. Internal error code: 55. at Microsoft.Office.Server.Social.SPSocialUtil.TryTranslateExceptionAndThrow(Exception exception) at Microsoft.Office.Server.Social.SPSocialUtil.InvokeWithExceptionTranslation[T](ISocialOperationManager target, String name, Func`1 func) at Microsoft.Office.Server.Social.SPSocialFeedManager.<>c__DisplayClass48`1.<s2sinvoke>b__47() at Microsoft.Office.Server.Social.SPSocialUtil.InvokeWithExceptionTranslation[T](ISocialOperationManager target, String name, Func`1 func)

    The statement, "...server could not access the distributed cache...," occurred frequently in many other ULS event messages.
  4. Review UPA Connection Permissions: farm, application, and admin accounts all provisioned with Full Control.
  5. Review IIS Application Pool Identities on WFEs: noted that one application pool used the general farm's service service account (e.g., spService).
  6. Review IIS Application Pool Identities on APP: noted that farm's service service account used as application pool identity for six service applications, including the UPA service.
  7. Grant account UPA connection full control: provisioned the farm's service service account with UPA Full Control connection permission.
  8. Check My Site News Feed: navigated back to My Site Newsfeed, and then clicked the Everyone link: this time all of the documents I had already "followed" appeared listed.

Solution

  • Grant the UPA service account Full Control in the UPA Connect Permissions for User Profile Service.

References

  • Note that the ULS error entries identified by Mark Priem in his blog posting are different than the ones I experienced here.  However, the symptoms were similar, the error messages both involved UPA, and the cause was found ultimately to be the same too.
  • Need to update the installation manual to include provisioning the service account with UPA Full Control permission.

No comments: