Special thanks to Iris Sakura.
Problem: If you remove one SharePoint server from Central Administration site, some information will be left in farm database. While adding a server with the same name back to farm, the Distributed Cache service may not able to start.
Fix: On the new installed server
- Open C:\Program Files\AppFabric 1.1 for Windows Server\DistributedCacheService.exe.config with a notepad or other text editor with administrator permission.
- Nav to configuration – dataCacheConfig – clusterConfig, remember the provider and connectionString.
- Start PowerShell.
- Run Add-CacheHost -ProviderType xxx -ConnectionString yyy
xxx is the provider gotten from step 2 and yyy is connectionString.
- Run Unregister-CacheHost
- Run Remove-CacheHost
You are ready to re-run the Add-SPDistributedCacheServiceInstance now.