SharePoint 2016 Server-Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage ‘DistributedLogonTokenCache’ – Exception ‘Microsoft.ApplicationServer.Caching.DataCacheException:

Problem:
SharePoint 2016 Server with multitier SharePoint farm deployment.
Getting following exceptions at regular intervals:

Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to communicate with the server : net.tcp://DEVWFECONVERGEN:22233    
 at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, IClientChannel channel)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)    
 at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'.
Secondly,
Token Cache: Failed to initialize SPDistributedSecurityTokenCache  Exception: 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to communicate with the server : net.tcp://DEVWFECONVERGEN:22233    
 at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, IClientChannel channel)    
 at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)    
 at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()    
 at Microsoft.SharePoint.DistributedCaching.SPDistributedCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encryptData)    
 at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCache..ctor(String name, TimeSpan timeToLive, SPDistributedCacheContainerType containerType, Boolean encrptyData, TimeSpan minimumTokenExpirationWindow)    
 at Microsoft.SharePoint.IdentityModel.SPDistributedSecurityTokenCacheInitializer.Init(Object state)'.

Solution:
Distributed Cache service The Distributed Cache service provides caching features in SharePoint Server 2013. The microblog features and feeds rely on the Distributed Cache to store data for very fast retrieval across all entities. The Distributed Cache service is built on Windows Server AppFabric, which implements the AppFabric Caching service. Windows Server AppFabric installs with the prerequisites for SharePoint Server 2013.

As soon as you use social features of SharePoint like Microblog (Newsfeed), Following, Likes or other stuff (Sharing. User Profile Features, etc.) you need the Distributed Cache service. No way around!
If you want to setup the User Profile Service successfully you need the Distributed Cache Service. No way around!
As wellt he Distributed Cache Service is needed or can be used for Security Trimming, OneNote access and Page load performance.
And the Distributed Cache service needs the AppFabric service which is installed on the SharePoint Server as soon as you install SharePoint Prerequisites.

When, App Fabric cache service is started, via control panel. It fails with following error.

Application: DistributedCacheService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.

Exception Info: System.UriFormatException
   at System.Uri.CreateThis(System.String, Boolean, System.UriKind)
   at Microsoft.ApplicationServer.Caching.ServiceConfigurationManager.InitializeThisHostData()
   at Microsoft.ApplicationServer.Caching.ServiceConfigurationManager..ctor()
   at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartService(Boolean)
   at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartServiceCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

So, this error suggest URI is bad.
Issue:
NetBios name of Server was: DevWEFConvergen
Hostnames of server was: DEVWEFConvergence

Hostnames or NetBIOS names were used to provide a friendlier means of identifying servers or workstations.
NetBIOS names is based on an older protocol and should be used within a LAN only and registers itself on that network everytime that PC is powered up or rebooted using LMHOSTS, broadcasts or WINS to provide resolution of a NetBIOS hostname to it’s IP address. Thet are limited to 16 characters in length with 15 characters visible. NetBIOS names cannot be used as part of a doamin. The underscore character “_” is only used in NetBIOS names.
Hostnames TCP/IP based are resolved either with a static HOSTS file on your PC or from a DNS service. They typically are used as part of a domain. The hostname uses “-” instead of “_” as most DNS will reject this character and can be up to 255 characters in length.

From Windows 2000 on you can disable NetBIOS and your network will be a lot quieter. I would recommend acquiring some basic TCP/IP books which also cover NetBIOS and experiment with your systems. You wil really need two PC’s minimal and some sort of sniffer tool to understand. You can read all you want, but until you play with these two protocols it won’t really click. The NetBIOS name cannot be readily distinguished from a hostname until you get a domain established. I have only glossed over this question and I am sure others will throw in probably better explanations.
Solution:
First useful hint was Get-CacheHost output where the name was incorrect. Then solution was easy:
1. Export-CacheClusterConfig -Path \config.xml
2. Edit file and fix your hostname
3. Import-CacheClusterConfig -Path \config.xml
Start-CacheCluster

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: