How to Fix Distributed Cache Error in SharePoint 2016?
Distributed Cache (DC) is one of the new components that is added in SharePoint. It plays an important role in the SharePoint server because this is a key component for performance and caching.
This Distributed cache is not a SharePoint service but a standalone service called AppFabric 1.1 for Windows servers. This is known as one of the dangerous parts of SharePoint in terms of social computing. Though it may not cause an issue while managing Distributed Cache in SharePoint because it is quite comfortable using PowerShell and this is also applied for the same when repairing.
However, in SharePoint 2016 many users complained they are getting the Distributed Cache Error, so below have a look what this error and how to fix Distributed Cache Error in SharePoint?
Issue:
When MinRole SharePoint 2016 server is set up with 9 SharePoint servers then one Distributed cache server does not behave properly and it gives the error “cacheHosInfo is null”. Even it is said that “Distributed cache host may have caused the cache reliability problems”.
However, there are multiple servers farm and so Distributed cache can run only 1 server in the farm. But actually when the use-CacheCluster command is run on one of the SharePoint servers then the below-mentioned error is received.
Use-CacheCluster : ErrorCode:SubStatus:Error in reading
Causes:
Well, the cause of this error states that the server is not able to read and get the values of the connection string. However, the information is from AppFabric and when the Distributed Cache service is not running on the server then make sure it is because of the error as the server is not able to communicate to AppFabric.
Well to check where the Distributed cache is running on which server, some process can be done.
PowerShell
In SharePoint, open PowerShell and then run the below-mentioned command:
After running the above command, only one server is returned where DC is running and the problem is seen.
How to Fix Distributed Cache Error in SharePoint?
Well, everything is in front as expected but when you want to access the Distributed cache from all servers in the farm so you have to allow the provision of the DC instance on every server in the farm. Here some of the ways to fix the Distributed Cache error.
Solution 1: Use PowerShell
Now nothing to be done except leaving it. If you want to run this command then you have to log in on the server where the Distributed cache is running and then run it.
- After that login to the server where you have allowed the DC
- Now open PowerShell and then run the below command:
Use-CacheCluster
Get-CacheHost
Solution 2: Install Distributed Cache
Now install the Distributed cache instance on a server in the farm and then stop it, though it may look some odd type it works. After that run, the below mentioned command on the server where you have to run the DC.
add-SPDistributedCacheServiceInstance
Following the above command successfully supplies Distributed Cache service instance on the server and after that start the service and again run the below-mentioned command:
stop-SPDistributedCacheServiceInstance -Graceful
Following the command will only stop the DC on the server but will not remove it. Now when you run:
Use-CacheCluster
Get-CacheHost
Now as you can see the DC is up on the server where you run it and down on the server that you want it. Now check if the Distributed Cache error in SharePoint is fixed or not.
But if not then in this case go for the automatic SharePoint Repair Tool.
Easy Solution to Fix Distributed Cache Error in SharePoint
Well, when any type of error occurs in SharePoint then it becomes inaccessible and it needs to be repaired. However, when all the above option does not work, to fix the error then feel free to use the SharePoint File Repair Tool.
This is one of the best software which completely works in repairing the SharePoint database. It allows administrators or users to extract SharePoint databases such as documents, tables, indexes, labels, media files, and other objects from inaccessible MDF files.
It not only repairs the corrupted SharePoint database but also restores the deleted or corrupted database and then save the recovered MDF files at a specific location on your system.
Steps to Run the SharePoint Repair Tool
- Firstly, download, install, and launch the SharePoint Recovery Tool.
- The interface screen displays two options to recover SharePoint data: ‘Complete Repair‘ and ‘Document Recovery‘. Select as per your requirement.
- If you choose ‘Complete Repair‘, the screen will show the options for selecting and searching SQL Server (.MDF) files. Click on ‘Browse‘ to select a SharePoint database for repair.
- If you do not know the actual path of the database which you want to repair, click on the ‘Find‘ to locate the MDF file in a specific drive.
- After selecting the desired file initiate the scanning process.
- After finishing the scan, the software would generate a tree of all SharePoint database tables and will display it in the left pane. You can select the table in the tree and can have the entire preview in the right pane. Then click on ‘Repair‘ to begin repairing for the selected database.
- After clicking on ‘Repair‘, this dialog box will appear. Specify the SQL Server name or Instance name and the desired destination path.
- Click on the ‘Browse‘ option to choose the destination path. And select the ‘OK‘ button.
- Once this process gets completed, you would find a dialog box that displays this message ‘Recovered file saved at the desired location.” This shows that Recovery Process has successfully completed’.
- Select the ‘OK‘ button.
- You would find another dialog box that asks whether you want to attach the repaired database to the web application. If you click on the ‘Yes‘ button, the above dialog box will be displayed.
- In the web application type URL, the name of the corrupt database and SQL Server Instance name.
- Then select the ‘OK‘ button and proceed.
- When the process gets finished, you would be able to access the repaired database by opening the web application.
Conclusion:
So, this is all about the Distributed Cache error in SharePoint 2016. I tried my best to list down the complete fixes to resolve the Distributed cache error.
Hope the solutions given works for you to fix this nasty SharePoint error. But if not then run the advanced SharePoint Repair Tool.
If you have any other queries or suggestions, then share them with us on Facebook. Also, if you like this article, then share it with the users going through the same issue.
Jacob Martin is a technology enthusiast having experience of more than 4 years with great interest in database administration. He is expertise in related subjects like SQL database, Access, Oracle & others. Jacob has Master of Science (M.S) degree from the University of Dallas. He loves to write and provide solutions to people on database repair. Apart from this, he also loves to visit different countries in free time.