Forum Discussion
SharePoint SE - Distributed cache service is not enabled in this deployment.
Hi everyone,
I have been struggling for a few weeks now with a Distributed Cache issue in my SharePoint farm. The service configuration seems completely out of sync between my two Web Front Ends (WFEs).
1 Root Cause / History:
Originally, the Distributed Cache was working perfectly. However, after a Windows Update, both of our original WFE servers broke completely (we couldn't repair them using DISM). Because of this, we built two brand new WFE servers to replace them.
Crucially, because the old servers were broken, we performed the steps in this order:
1. We built and added the two new WFE servers to the farm first.
2. After adding the new ones, we removed the two broken ones using the Configuration Wizard, and subsequently deleted them from Central Administration since they were still showing up.
Because the old servers were never gracefully decoupled from the Distributed Cache before they died and were removed, the internal Distributed Cache configuration in the SharePoint configuration database is now corrupted.
2 Environment & Farm Topology:
• SharePoint Version: SharePoint Subscription Edition (SE)
• OS: Windows Server 2025
• Database: SQL Server 2025
• Topology: 2 Web Application servers (App servers) and 2 brand new Web Front End servers (Server 1 and Server 2).
• Note: All required Distributed Cache firewall ports (22233, 22234, 22235, 22236) are completely open on both servers.
3 The Current Symptoms on the New WFEs:
• Server 1: The Windows Configuration Wizard runs and completes successfully. However, in Central Administration, the Distributed Cache service status for this server is stuck on "Error Stopping".
• Server 2: Distributed Cache does not work at all. Running Get-SPCacheHost prompts for a HostName, indicating it cannot find the host in the cache configuration.
• Cache Health Error: Running Get-SPCacheClusterHealth fails completely with:
ErrorCode<ERRCAdmin040>:SubStatus<ES0001>:Failed to connect to hosts in the cluster
• Health Analyzer Errors:
1. "Distributed cache service is not enabled in this deployment."
2. "Server role configuration isn't correct." (Specifically flagging Server 2).
4 What I Have Tried So Far:
1. Cleaned up old servers from Config: I exported the cache cluster config (Export-SPCacheClusterConfig), manually removed the two old, decommissioned servers from the XML file, and imported it back.
2. Repair via Central Admin: Tried to use the built-in repair and fix options in CA, but without success.
3. Attempted Fix from Microsoft Learn: I followed the steps outlined in this Microsoft Learn thread regarding a renamed server issue: [https://learn.microsoft.com/en-ie/answers/questions/5907941/distributed-cache-not-working-on-a-renamed-sharepo]
4. Forced Deletion on Server 2: Because Remove-SPDistributedCacheServiceInstance failed with a cacheHostInfo is null error, I used PowerShell to force-delete the service instance object on Server 2:
PowerShell
$instanceName = "SPDistributedCacheService Name=SPCache"
$serviceInstance = Get-SPServiceInstance | ? { ($_.Service.ToString()) -eq $instanceName -and ($_.Server.Name) -eq "Server02" }
$serviceInstance.Delete()
5. Re-adding Server 2: When I now try to re-add the instance on Server 2 using Add-SPDistributedCacheServiceInstance, it fails with:
ErrorCode<HostAlreadyPresent>:SubStatus<ES0001>:Host name Server02 is already present in cluster configuration.
6. Configuration Wizard on Server 2: Running the SharePoint Configuration Wizard (PSConfig) on Server 2 fails with:
An exception of type System.InvalidOperationException was thrown. Additional exception information: cacheHostInfo is null.
7. Farm Rejoin: I completely removed Server 2 from the SharePoint farm and added it back again. Unfortunately, this did not resolve the Distributed Cache mismatch.
5 Summary of the Problem:
Server 1 is stuck on "Error Stopping" in CA. Server 2 is completely disconnected from the cache cluster (Failed to connect to hosts in the cluster). SharePoint throws HostAlreadyPresent when trying to add Server 2, but throws cacheHostInfo is null when trying to configure or remove it, while complaining that Server 2's role configuration is incorrect.
Any help would be greatly appreciated!