Unregister-CacheHost fails when trying to unregister a reimaged server

Unanswered Unregister-CacheHost fails when trying to unregister a reimaged server

  • Thursday, May 10, 2012 10:58 PM
     
     

    One of our cache servers crashed and had to be reimaged. Now I'm unable to unregister that host using the Unregister-CacheHost command because of the exception below.

    What's the supported way of removing that server in this scenario without having to bring the entire cluster down and recreating it.

    PS C:\Windows\system32> Get-CacheHost
    Get-CacheHost : ErrorCode<ERRCAdmin032>:SubStatus<ES0001>:Invalid operation enc
    ountered on SN2SCH020114032.<domain>:AppFabricCachingService : Service AppFabric
    CachingService was not found on computer 'SN2SCH020114032.<domain>'.
    At line:1 char:14
    + Get-CacheHost <<<<
        + CategoryInfo          : InvalidOperation: (:) [Get-CacheHost], DataCache
       Exception
        + FullyQualifiedErrorId : ERRCAdmin032,Microsoft.ApplicationServer.Caching
       .Commands.GetCacheHostCommand


    HostName : CachePort          Service Name            Service Status Version In
                                                                         fo
    --------------------          ------------            -------------- ----------
    SN2SCH010103028.<domain>:22233 AppFabricCachingService DOWN           3 [3,3][1,
                                                                         3]
    SN2SCH010103126.<domain>:22233 AppFabricCachingService DOWN           3 [3,3][1,
                                                                         3]
    SN2SCH020114032.<domain>:22233 AppFabricCachingService UNKNOWN        0 [0,0][0,
                                                                         0]

    PS C:\Windows\system32> Unregister-CacheHost -hostname SN2SCH020114032.<domain> -
    provider System.Data.SqlClient -connectionstring "Data Source=SN2SCH020112109;In
    itial Catalog=AppFabricConfig;Integrated Security=True"
    Unregister-CacheHost : ErrorCode<HostEntryNotFound>:SubStatus<ES0001>:Could not
     find host SN2SCH020114032.<domain>:AppFabricCachingService in cluster configura
    tion store.
    At line:1 char:21
    + Unregister-CacheHost <<<<  -hostname SN2SCH020114032.<domain> -provider System
    .Data.SqlClient -connectionstring "Data Source=SN2SCH020112109;Initial Catalog=
    AppFabricConfig;Integrated Security=True"
        + CategoryInfo          : NotSpecified: (:) [Unregister-CacheHost], DataCa
       cheException
        + FullyQualifiedErrorId : HostEntryNotFound,Microsoft.ApplicationServer.Ca
       ching.Configuration.Commands.UnregisterCacheHostCommand

All Replies

  • Sunday, May 20, 2012 10:50 PM
     
     
    Bump!
  • Monday, May 21, 2012 4:37 PM
     
     

    Hi Arun,

    Sorry for the delayed response. I'm assuming you're using 1.0 version of AppFabric Caching. Unregister-Cache host should work in this scenario. To get more clarity, can you paste the contents of ClusterConfig.xml here? 

    Thanks,

    Bharath

  • Tuesday, May 22, 2012 12:15 AM
     
     

    No, I'm using 1.1.

    Not sure if you meant this file: "C:\Program Files\AppFabric 1.1 for Windows Server\ClusterConfig.xml" but the contents were:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <configSections>
        <section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core" />
      </configSections>
    </configuration>

    I'm using SQL as the provider.  Below is the output for: Export-CacheClusterConfig config.txt (with domain name manually replaced with <domain>)

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </configSections>
        <dataCache size="Small">
            <caches partitionCount="32">
                <cache consistency="StrongConsistency" name="default" minSecondaries="0">
                    <policy>
                        <eviction type="Lru" />
                        <expiration defaultTTL="10" isExpirable="true" />
                    </policy>
                </cache>
                <cache consistency="StrongConsistency" name="RemoteCache" minSecondaries="0">
                    <policy>
                        <eviction type="Lru" />
                        <expiration defaultTTL="10" isExpirable="true" />
                    </policy>
                </cache>
            </caches>
            <hosts>
                <host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
                    hostId="1781406312" size="12286" leadHost="true" account="<domain>\SN2SCH010103028$"
                    cacheHostName="AppFabricCachingService" name="SN2SCH010103028<domain>"
                    cachePort="22233" />
                <host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
                    hostId="1208645325" size="12286" leadHost="true" account="<domain>\SN2SCH010103126$"
                    cacheHostName="AppFabricCachingService" name="SN2SCH010103126<domain>"
                    cachePort="22233" />
                <host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
                    hostId="1897206163" size="12286" leadHost="true" account="<domain>\SN2SCH020114032$"
                    cacheHostName="AppFabricCachingService" name="SN2SCH020114032<domain>"
                    cachePort="22233" />
            </hosts>
            <advancedProperties>
                <securityProperties mode="None" protectionLevel="None" />
            </advancedProperties>
            <deploymentSettings>
                <deploymentMode value="RoutingClient" />
            </deploymentSettings>
        </dataCache>
    </configuration>

    Also please see thread http://social.msdn.microsoft.com/Forums/en-US/velocity/thread/b2dfa824-7d58-415f-8cba-9265e28d46c4/. We have to use FQDN because of the issues mentioned in that thread.

    Thanks

    Arun

  • Tuesday, May 22, 2012 5:45 AM
     
     

    Hi Arun,

    I saw the thread which you had mentioned. Looks to me that the two issues are related. I have a few questions:-

    1. I wasn't clear on how you resolved the problem. You said the service starts when you used the FQDN. Are you talking about the entry in the hosts file?

    2. Is the machine name entry still there in the host file? There is a known issue in 1.1 , wherein the service crashes when such an entry is present. If present, please remove the entry in the hosts file or replace it with a FQDN entry.

    Thanks,
    Bharath