Can't start/add Distributed Cache 2013

Nguyen, Tee 106 Reputation points
2021-11-28T05:01:44.987+00:00

I had SharePoint 2013 single server and got the following error when I start/add distributed cached services.

Run PowerShell:

PS C:\Windows\system32> $instanceName ="SPDistributedCacheService Name=SPCache"
$serviceInstance = Get-SPServiceInstance | ? {($.service.tostring()) -eq $instanceName -and ($.server.name) -eq $env:computername}
$serviceInstance.Provision()
You cannot call a method on a null-valued expression.
At line:3 char:1

  • $serviceInstance.Provision()
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : InvokeMethodOnNull

When I run

PS C:\Windows\system32> Get-cachehost

HostName : CachePort Service Name Service Status Version Info


QAServer01.Parsons.com:22233 AppFabricCachingService UNKNOWN 0 [0,0][0,0]
QAServer02.Parsons.com:22233 AppFabricCachingService UNKNOWN 0 [0,0][0,0]

I see Distributed Cache service was not start in Central Admin so I started service and got the following error:

cacheHostInfo is null

QAServer02 had been disconnected and decommissioned from farm so only QAServer01 run SharePoint as single server.

What could be wrong? How can I start Distributed Cache correctly?

Thanks
Tee

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JoyZ 18,126 Reputation points
    2021-11-29T08:21:28.35+00:00

    @Nguyen, Tee ,

    For SharePoint server 2013, please run the following command to start the Distributed Cache:

    $instanceName ="SPDistributedCacheService Name=AppFabricCachingService"  
    $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}  
    $serviceInstance.Provision()  
    

    Please note the difference between SharePoint Server Subscription Edition and SharePoint server 2013:

    153229-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.