SharePoint 2016 Troubleshooting: Configuration Wizard failed with error ‘CacheHostInfo is null’
Environment
- SharePoint 2016 Enterprise RTM
- Windows Server 2012 R2
Scenario
Install SharePoint RTM and run the configuration wizard.
Issue
The installation completed successfully however, the SharePoint Products Configuration Wizard failed by throwing ‘CacheHostInfo is null’ error.
Troubleshooting
1. Repair distributed cache
Tried to repair distributed cache on the server by executing the following line of PowerShell script
Get-SPServiceInstance
$s = Get-SPServiceInstance <<Distributed Cache GUID>>
$s.delete()
Add-SPDistributedCacheServiceInstance
For some reasons, the script throws following error on line Add-SPDistributedCacheServiceInstance:
Add-SPDistributedCacheServiceInstance : Could not load file or assemblly 'Microsoft. ApplicationServer.Caching.Configuration, Version=1.0.0.0, culture=neutral, PublicKeyToken=31bf3856ad364e35'or one of its dependencies. The system cannot find the file specified.
2. Start AppFabric Caching Service
Started AppFabric Caching Service and add the SPDistributedCacheServiceInstance.
3. Install CU7 for AppFabric 1.1
Since running the configuration wizard again failed, downloaded and Installed Cumulative Update 7 (KB3092423) for Microsoft AppFabric 1.1 for Windows Server
https://support.microsoft.com/en-in/kb/3092423
4. Reboot
Restart the computer after applying this cumulative update package.
5. PS Script
After successfully installing the CU package, execute the following PowerShell script to remove the caching service instance:
$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}
$serviceInstance.Delete()
6. Run the Configuration Wizard again
The configuration should be successful.