【问题标题】:AppFabric ErrorCode<ERRCA0017><ES0006>:AppFabric 错误代码<ERRCA0017><ES0006>:
【发布时间】:2010-10-08 15:52:02
【问题描述】:

我已经在服务器上安装了 AppFabric。我已经创建了单台计算机的集群。我还创建了一个名为“Gagan”的缓存。 按顺序使用以下命令

使用-CacheCluster -Provider xml -ConnectionString \NB-GJANJUA\Cache 启动缓存集群

结果是缓存服务启动并运行..到目前为止一切顺利。

然后我像下面这样设置我的 web.config 文件

<?xml version="1.0"?>
<configuration>
    <configSections>
    <section name="dataCacheClient"
type="Microsoft.ApplicationServer.Caching.DataCacheClientSection,
        Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, 
        Culture=neutral, PublicKeyToken=31bf3856ad364e35"
allowLocation="true"
allowDefinition="Everywhere"/>   

</configSections>

<!-- cache client -->
<dataCacheClient>
<!-- cache host(s) -->

<hosts>
  <host
     name="NB-GJANJUA.com"
     cachePort="22233"/>
</hosts>
</dataCacheClient>

<system.web>    

<compilation debug="true" targetFramework="4.0" >
    <assemblies>
      <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="Microsoft.ApplicationServer.Caching.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      <add assembly="Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </assemblies>
</compilation>

<sessionState mode="Custom" customProvider="SessionStore" cookieless="true">
  <providers>
    <add name="SessionStore" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider" cacheName="Gagan" />
  </providers>
</sessionState>
</system.web>

<system.webServer>
 <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>

但是一旦我启动我的网站,它就会出现这个错误

解析器错误消息:ErrorCode:SubStatus:暂时失败。请稍后重试。 (一个或多个指定的缓存服务器不可用,这可能是由于网络或服务器繁忙造成的。确保已为集群上的此客户端帐户授予安全权限,并且允许 AppFabric 缓存服务通过所有缓存主机上的防火墙。请稍后重试。)

来源错误:

Line 44:     <sessionState mode="Custom" customProvider="SessionStore" cookieless="true">
Line 45:       <providers>
Line 46:         <add name="SessionStore" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider" cacheName="Gagan" />
Line 47:       </providers>
Line 48:     </sessionState>

我有什么遗漏的吗?

注意:我已经引用了 Microsoft.ApplicationServer.Caching.Client 和 Microsoft.APplicationServer.Caching.Core 程序集

感谢您的时间和耐心

问候 加根·扬尤亚

【问题讨论】:

  • 我真的不知道为什么这里没有显示整个config .xml

标签: appfabric appfabric-cache


【解决方案1】:

我也遇到了这个错误。只是为了测试开发中的客户端,我使用 AppFabric Power Shell 命令关闭了安全性

   Stop-CacheCluster
   Set-CacheClusterSecurity -SecurityMode None -ProtectionLevel None
   Start-CacheCluster

还在客户端应用程序的 web.config 中设置以下内容

   <dataCacheClient>
     <securityProperties mode="None" protectionLevel="None"/>
   </dataCacheClient>

这不是生产场景,但应用这些设置后上述错误消失。

【讨论】:

    【解决方案2】:

    我遇到了类似的问题,在 Windows Server 2008 R2 上运行 IIS 7.5。我通过在 PowerShell 中发出以下命令来解决它(从“开始”、“所有程序”中的 Windows AppFabric 文件夹开始):

    New-Cache -CacheName NameOfCacheAsSetInWebConfig -TimeToLive 30  
    Grant-CacheAllowedClientAccount "IIS AppPool\NameOfAppPoolRunningSite"
    

    一旦我这样做了,我就准备好了。

    【讨论】:

      【解决方案3】:

      您是否已授予任何运行您网站的用户访问缓存的权限?

      Grant-CacheAllowedClientAccount 加根

      【讨论】:

      • 我在服务器级别和客户端级别都禁用了安全性
      【解决方案4】:

      我解决了这个问题如下:

      启动 Windows 任务管理器并注意 w3wp.exe 在哪个用户名下运行?

      在我的例子中是:ASP.NET v4.0

      启动开始 -> 所有程序 -> Windows Server App Fabric -> IIS 管理器

      在 IIS 中,选择机器名称,然后选择左上角的应用程序池。

      在应用程序池中..验证应用程序池下是否存在 ASP.net v4.0。

      启动开始 -> 所有程序 -> Windows Server App Fabric -> 缓存管理 Windows Power Shell

      在提示符下键入以下命令:Grant-CacheAllowedClientAccount "ASP.NET v4.0"

      重新启动网络应用程序,以下错误消失:

      ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified Cache servers are unavailable, which could be caused by busy network or servers. Ensure that security permission has been granted for this client account on the cluster and that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Retry later.)
      

      【讨论】:

        【解决方案5】:

        我遇到了这个问题,只是缓存集群在重新启动后关闭了。我没有意识到您必须手动切换服务才能在服务中自动启动。详细信息是here

        【讨论】:

          【解决方案6】:

          在配置中注释掉以下内容为我修复了它:

          <sessionState customProvider="AppFabricCacheSessionStoreProvider" mode="Custom" timeout="90">
            <providers>
              <add name="AppFabricCacheSessionStoreProvider" type="Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider" cacheName="Session" sharedId="SharedApp" />
            </providers>
          </sessionState>
          

          【讨论】:

          • 这有效地关闭了 AppFabric 的使用,仅供参考。
          【解决方案7】:

          默认情况下,工作进程将设置为 iis 用户,这些用户需要访问权限。在您的 缓存管理 Windows Powershell 中键入以下内容

          Grant-CacheAllowedClientAccount IIS_IUSRS

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 2014-09-08
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多