Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have setup a development environment for SharePoint 2013 so we can begin testing our 2010 content, however I am running into trouble starting the Distributed Cache service. Note that this is currently a clean install, there is no 2010 content or installation. We are using Server 2012, SQL Server 2012 (v11.0.2100) and SharePoint 2013. AppFabric 1.1 was installed as a prerequisite for Sharepoint 2013.

Looking at the Windows Server Services, I can see that the AppFabric Caching Service is Running.

I have ensured that AppFabric is installed and configured correctly, and have setup a network share, however, when I go to start the Distributed Cache service, I get the error:

cacheHostInfo is null

When digging into the logs using the correlation id, I end up with this line here:

A failure occurred in SPDistributedCacheServiceInstance::Provision. cacheHostInfo is null for host 'my_server_name'.

where my_server_name is the name of the dev server.

I looked at the AppFabric Config wizard, and it states "This machine is a part of an AppFabric Caching cluster." So according to AppFabric, it is all setup, and the network share is linked correctly.

The service is linked to a user account which I have created for this purpose and have given it the permissions required through Local Security Policy (Bypass traverse checking, Generate security audits, Log on as a service). This user has been granted access to the network share.

Is there anything else I need to check or try to get this running? Or has anyone seen this error before?

share|improve this question
    
Even I am facing the same issue, i set the cachesize to 300 MB but still not working. I am running standalone sharepoint solution on 8Gb ram Machine. My search service is not working because of it. Everytime i start the service it gives me the "cacheHostInfo is null" error. I tried via UI as well as powershell, but same error. Any Help on this? –  user14456 Jan 28 '13 at 9:59
    
Hi Dhaval, I ended up doing three things to resolve this. Ensure enough RAM is free when running normally (as per answer below), remove and re-install AppFabric (Install file here: microsoft.com/en-us/download/details.aspx?id=27115), and set the cache to use 100Mb. Hope this helps. –  ChrisOi Jan 29 '13 at 0:02
    
Thanks Chris. How much memory/RAM should be fine for the stand alone server ? –  user14561 Jan 31 '13 at 17:13
    
As mentioned below, the minimum would be 8Gb RAM and a 4 core processor. This seems to be fine for me, but look at how much you will be doing with the server to make sure. (I only have a few small sites on there right now, running OOB features) –  ChrisOi Jan 31 '13 at 22:54

4 Answers 4

up vote 2 down vote accepted

Follow the steps from Plan and use the Distributed Cache service in SharePoint Server 2013 under the section titled "Repairing a Cache Host".

-Run Get-SPServiceInstance to find the GUID in the ID section of the Distributed Cache Service that is causing an issue.

-Run these commands:

$s = get-spserviceinstance GUID 
$s.delete()

-Recreate the Service with this command:

Add-SPDistributedCacheServiceInstance
share|improve this answer
    
+1 for providing a supported solution. I will see if I can jump onto my old VM and confirm the fix when I have time –  ChrisOi Jul 3 '13 at 22:11
    
Finally got back to looking at this, as we will be starting our upgrades to SP2013 in the next few months. It works like a charm. Thanks for the info, should help others with this in future. –  ChrisOi Jan 9 at 11:12

When you install the SharePoint 2013 it installs the service by default and assigns the Distributed Cache service 10 percent of the total physical memory on the server (see more details)

It might be you'r having less memory on your SP Installation. So you might need to update the distributed Cache Service to specify the amount of RAM or increase the RAM for overall SP installation.

Update: Just did a small PS script that delete and re provisions the service again:

$Farm = Get-SPFarm
$Name = "SPDistributedCacheCluster_" + $Farm.Id.ToString()
$Manager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$Info = $Manager.GetSPDistributedCacheClusterInfo($Name);
$instance ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instance -and ($_.Server.Name) -eq $env:computername}

if([System.String]::IsNullOrEmpty($Info.CacheHostsInfoCollection))
{
    $serviceInstance.Delete()
    Add-SPDistributedCacheServiceInstance
    $Info.CacheHostsInfoCollection
} 
share|improve this answer
    
I have made the change to the cache size using the PS command Update-SPDistributedCacheSize -CacheSizeInMB 250. I have then attempted to provision the cache again, however I am still getting the same error, whether I use PS or the web interface. Are you aware of any way to verify the current cache size? –  ChrisOi Jan 3 '13 at 22:44
    
Can you try setting the cache size to 100MB? –  Falak Mahmood Jan 3 '13 at 22:45
    
Thanks for your help so far, it seems that the 100MB cache is still not starting, with the same error message 'cacheHostInfo is null'. I also tried 50 and 150 MB. This shouldn't really be a problem though, as I have had 3Gb of free RAM on the machine. –  ChrisOi Jan 7 '13 at 21:12
    
how much have you assigned to the whole development enviroment? –  Falak Mahmood Jan 7 '13 at 22:06
    
I have assigned 6GB total for the server –  ChrisOi Jan 7 '13 at 22:36

I hope it could help you to find out what the problem is

http://rakasatria.wordpress.com/2013/02/04/sharepoint-2013-spdistributedcacheserviceinstance-cachehostinfo-is-null/

really hope that it could help you.

Regards, Raka

share|improve this answer
    
While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. –  SPDoctor Feb 7 '13 at 16:34
    
Hi Raka, As I had an old version of the server instance that still has this problem, I fired it up and tried your script. Unfortunately it has not resolved the core issue, but thanks for your suggestion. –  ChrisOi Feb 7 '13 at 21:24

I have noted the common issues and solutions w.r.t distributedcache http://sharepointjournal.com/2014/08/19/sharepoint-2013-distributed-cache-boon-or-bane/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.