zoukankan      html  css  js  c++  java
  • SharePoint 2013移除服务器报错"CacheHostInfo is null"

    笔者将一台SharePoint 场中的一台机器通过Configuration Wizard退了场. 当笔者想到管理中心去Remove Server的时候, 遇到了报错:

    CacheHostInfo is null

    上网搜索一下, 发现这篇文章. 写得非常好, 我把他的脚本运行了一遍, 解决了这个问题.

    问题描述

    ===========================

    image

     image

    ULS Log中的条目

    06/06/2013 23:50:51.33    w3wp.exe (0x17AC)    0x067C    SharePoint Foundation    DistributedCache    ajeou    Unexpected    A failure occurred in SPDistributedCacheServiceInstance::UnprovisionInternal. cacheHostInfo is null for host 'APP1'.    3cf9229c-3b22-2062-33bb-ec5a90a0419f


    06/06/2013 23:50:51.33    w3wp.exe (0x17AC)    0x067C    SharePoint Foundation    DistributedCache    ajeoy    Unexpected    A failure occurred SPDistributedCacheServiceInstance::UnprovisionInternal()... isGraceFulShutDown 'False' , isGraceFulShutDown, Exception 'System.InvalidOperationException: cacheHostInfo is null     at Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheServiceInstance.UnProvisionInternal(Boolean isGraceFulShutDown)'    3cf9229c-3b22-2062-33bb-ec5a90a0419f


    06/06/2013 23:50:51.33    w3wp.exe (0x17AC)    0x067C    SharePoint Foundation    DistributedCache    aelvg    Unexpected    A failure occurred SPDistributedCacheServiceInstance::UnProvision() , Exception 'System.InvalidOperationException: cacheHostInfo is null     at Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheServiceInstance.UnProvisionInternal(Boolean isGraceFulShutDown)     at Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheServiceInstance.Unprovision()'    3cf9229c-3b22-2062-33bb-ec5a90a0419f


    06/06/2013 23:50:51.34    w3wp.exe (0x17AC)    0x067C    SharePoint Foundation    Runtime    tkau    Unexpected    System.InvalidOperationException: cacheHostInfo is null    at Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheServiceInstance.UnProvisionInternal(Boolean isGraceFulShutDown)     at Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheServiceInstance.Unprovision()     at Microsoft.SharePoint.Administration.SPServer.Delete()     at Microsoft.SharePoint.WebControls.TopologyView.RemoveLink_Click(Object sender, CommandEventArgs e)     at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    3cf9229c-3b22-2062-33bb-ec5a90a0419f

    解决方案

    ==================

    脚本列在这里.

    $SPFarm = Get-SPFarm
    
    $cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()
    $cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
    
    $cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName)
    
    $instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
    $serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq "APP1"}
    
    $serviceInstance.Delete()
    
    $cacheClusterInfo.CacheHostsInfoCollection 

    这里值得学习的是Get-SPServiceInstance的使用以及如何对其中的结果进行filter, 从而得到自己想要的service instance的用法.

    排错中心思想很简单, 已经退场的服务器APP1上还有Distribution Cache服务的注册信息没有清理干净. 需要找到这个service instance, 删掉它.

    参考资料

    ==============================

    Cannot Remove Server Reference from Farm CacheHostInfo is null

    http://summit7systems.com/cannot-remove-server-reference-from-farm-cachehostinfo-is-null/

  • 相关阅读:
    维护gcd的线段树 补发一波。。。
    BZOJ 4720: [Noip2016]换教室
    P2184 贪婪大陆 树状数组
    BZOJ 1047: [HAOI2007]理想的正方形 单调队列瞎搞
    POJ3280 Cheapest Palindrome 区间DP
    BZOJ 2288: 【POJ Challenge】生日礼物 堆&&链表
    BZOJ 4236: JOIOJI map瞎搞
    浅谈最近公共祖先(LCA)
    题解 BZOJ 1912 && luogu P3629 [APIO2010]巡逻 (树的直径)
    [笔记] 求树的直径
  • 原文地址:https://www.cnblogs.com/awpatp/p/3124185.html
Copyright © 2011-2022 走看看