Distribute Cache Service Started throwing CacheHostInfo is null exception
Distribute Cache Service Stopped working After Renaming Windows
After renaming Windows
server name, Distributed Cache server started throwing error “CacheHostInfo is
null” while trying to start service.
Background:
I've created a Single Server Farm for testing purpose and decided to make it live with Smallest Min Role farm configuration. So I've performed following steps:
- Renamed the Windows name to New name.
- Configured SharePoint farm successfully with new name.
- Run Remove-SPDistributedCacheServiceInstance command to remove Distributed cache service.
- Converted Server Role from Single Server to Application with Search
- Added WFE server with Web Front End with Distributed Cache role.
- Tried to start Distributed Cache service on new server. here comes the problem it started throwing error CacheHostInfo is null.
- And in Get-CacheHost return old server name was displayed.
Resolution:
As it was pointing to old server name so created old server name
entry in Host File to point to new IP.
On the non-functioning Distributed Cache host, use
the following procedures to restore the Distributed Cache host.
1.
At the SharePoint Management Shell command prompt,
run the Remove-SPDistributedCacheServiceInstance cmdlet.
2.
At the SharePoint Management Shell command prompt,
run the Add-SPDistributedCacheServiceInstance cmdlet.
Note
If step 1 fails,
manually remove the Distributed Cache service, use the following steps.
·
At the SharePoint
Management Shell command prompt, type the following syntax.
|
Run Get-CacheHost, if
it returns both server names then remove old server otherwise register new
server using following command:
$ConnectionString =
(Get-SPDatabase | ?{$_.Type -eq "Configuration
Database"}).DatabaseConnectionString
Register-CacheHost -Provider
"SPDistributedCacheClusterProvider"
-ConnectionString $ConnectionString
-Account $Account
-CachePort 22233
-ClusterPort 22234
-ArbitrationPort 22235
-ReplicationPort 22236
-HostName SPWFE01
After registering new server run Get-CacheHost, it should returns both server names.
Now unregister the old
server name:
Unregister-CacheHost -Provider
"SPDistributedCacheClusterProvider"
-ConnectionString $ConnectionString
-HostName "SP19App0"
After un-registering old server run Get-CacheHost it should returns new server name only.
Now run Add-SPDistributedCacheServiceInstance cmdlet to configure distributed cache service. Open
Central Admin > System Settings > Manage Services on Server.
Check if Distributed Cache
service is displaying Processing, then wait for it to complete processing.
After processing completed, it’ll display yes in compliant column. If it doesn’t update the
status from No(processing) to Yes, then run configuration wizard (psconfigui.exe)
to configure the server and it’ll do necessary configuration to setup server.
This comment has been removed by a blog administrator.
ReplyDelete