【问题标题】:Azure in-role co-located caching: There is a temporary failureAzure 角色内并置缓存:出现临时故障
【发布时间】:2014-07-08 15:38:53
【问题描述】:

我一直在努力让 在 Azure 中发挥作用,共同定位缓存(非专用)。

在我的 MVC WebApi 2 项目的 web.config:

<configSections>
  <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
...
<dataCacheClients>
  <dataCacheClient name="default" isCompressionEnabled="true">
    <autoDiscover isEnabled="true" identifier="MyWebApiProject" />
    <clientNotification pollInterval="300" />
    <transportProperties maxBufferSize="1073741824" maxBufferPoolSize="1073741824"/>
  </dataCacheClient>
</dataCacheClients>

角色的缓存属性设置:

我在 Azure 中抛出了以下异常:

Microsoft.ApplicationServer.Caching.DataCacheException: 错误代码:子状态:暂时失败。 请稍后重试。 (一个或多个指定的缓存服务器是 不可用,这可能是由于网络或服务器繁忙造成的。为了 本地缓存集群,还要验证以下条件。 确保已为此客户端授予安全权限 帐户,并检查是否允许 AppFabric 缓存服务 通过所有缓存主机上的防火墙。还有 MaxBufferSize 服务器必须大于或等于序列化对象大小 从客户端发送。)。附加信息:客户正在尝试 与服务器通信:net.tcp://MyWebApiProject:24233。

当我关闭autoDiscover 时,像这样:

<autoDiscover isEnabled="false" identifier="MyWebApiProject" />

然后我得到一个不同的异常:

Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode:SubStatus:Server 集合不能 空。

使用 Compute Emulator 在本地运行时没有任何问题。

【问题讨论】:

标签: azure azure-web-roles appfabric azure-caching appfabric-cache


【解决方案1】:

将 Azure SDK 从 2.2 升级到 2.3 后,此问题就停止了。

【讨论】:

  • 只是添加到这个。 NuGet 包中的 Azure SDK 工具和 Azure DLL 的版本必须相同。当您更新一个而不是另一个时,通常会出现这些问题。奇怪的事情总是开始发生。如果升级工具,则​​需要转到 Azure 项目,右键单击并按属性,然后按升级。
  • @Adam:是的,我发现了类似的行为。感谢您的评论。
猜你喜欢
  • 1970-01-01
  • 2012-07-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-12-20
相关资源
最近更新 更多