remotely configure AppFabric cache using PSSession and invoke-command

คำตอบที่เสนอ remotely configure AppFabric cache using PSSession and invoke-command

  • 2010年10月20日 23:29
     
     

    Hi,

    I'm trying to remotely configure and get cache information from my cache server using enter-pssession and invoke-command. Both are giving me the same error.

    My machine is on the same domain as the cache server and the DB server.

    PS C:\Users\sandywu> invoke-command -ComputerName Server-FE-02 -ScriptBlock {import-Module DistributedCacheAdministration;Use-CacheCluster -Provider System.Data.SqlClient -ConnectionString "Data Source=Server-DB-01;Initial Catalog=VelocityDB;Integrated Security=True";get-cachehost}
    ErrorCode<AdminUIInvalidClusterSettings>:SubStatus<ES0001>:Invalid cluster settings provided.
        + CategoryInfo          : InvalidArgument: (:) [Use-CacheCluster], DataCacheException
        + FullyQualifiedErrorId : AdminUIInvalidClusterSettings,Microsoft.ApplicationServer.Caching.Commands.UseCacheClust
       erCommand
    ErrorCode<AdminUICacheAdminNullGet>:SubStatus<ES0001>:Error: No valid cluster settings were provided with Use-CacheClus
    ter.
        + CategoryInfo          : NotSpecified: (:) [Get-CacheHost], DataCacheException
        + FullyQualifiedErrorId : Microsoft.ApplicationServer.Caching.DataCacheException,Microsoft.ApplicationServer.Cachi
       ng.Commands.GetCacheHostCommand

    So the I tried to use pssession and that also failed:

    PS C:\Users\sandywu> enter-pssession -ComputerName Machine-fe-02
    [Machine-fe-02]: PS C:\Users\sandywu\Documents> import-module distributedcacheadministration
    [Machine-fe-02]: PS C:\Users\sandywu\Documents> use-cachecluster -Provider System.Data.SqlClient -ConnectionString "Data Source=Machine-DB-01;Initial Catalog=VelocityDB;Integrated Security=True"
    ErrorCode<AdminUIInvalidClusterSettings>:SubStatus<ES0001>:Invalid cluster settings provided.
        + CategoryInfo          :
        + FullyQualifiedErrorId : AdminUIInvalidClusterSettings,Microsoft.ApplicationServer.Caching.Commands.UseCacheClust
       erCommand

    [Machine-fe-02]: PS C:\Users\sandywu\Documents> exit-pssession

     

    I tried the same use-cachecluster command on the cache server itself and it did not complain about the invalid cluter setting.  Am I missing something?  Thanks for any suggestions.

     

    Sandy

     

     

すべての返信

  • 2010年10月21日 18:33
     
     

    These errors  also appeared in the SQL server log:


    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors.

  • 2010年10月22日 13:40
     
     回答の候補

    This error is occuring while trying to connect with cluster configuration (SQL Server).

    Check if remote connection is allowed in SQL Server. Go to SQL Server configuration manager and make sure the browser service is running. Also that the TCP protocol is enabled.

    Can you also provide the exception statcktrace to be sure this is the same error as I am expecting. When this error occurs, run in Powershell: $error[0].Exception.ToString()

  • 2012年3月27日 18:29
     
     

    Was there any work-around for this error? I've hit this error when i try to restart the cache cluster from a remote machine using powershell.

    Btw can you folks expose a C# API for this along with the cache access API's.

  • 2012年3月27日 18:41
     
     
    Turning on Sql Server Browser solved the issue. Is this the recommended way to solve this problem in a production system?