无法使用API​​添加缓存项 [英] failed to add cache item with API

查看:64
本文介绍了无法使用API​​添加缓存项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用下载的示例代码时,我在执行add方法时遇到异常。它说:

when i use the downloaded sample code, i got exception when doing add method. it say:

Microsoft.ApplicationServer.Caching.DataCacheException未处理

  HelpLink = http://go.microsoft.com/fwlink/?LinkId = 164049

 消息= ErrorCode< ERRCA0017>:SubStatus< ES0006>:存在临时故障。请稍后重试。 (一个或多个指定的缓存服务器不可用,这可能是由繁忙的网络或服务器引起的。对于内部部署缓存集群,还需要
验证以下条件。确保已为此客户端帐户授予安全权限,并且检查是否允许AppFabric缓存服务通过所有缓存主机上的防火墙。服务器上的MaxBufferSize必须大于或等于从客户端发送的序列化对象大小
。)

  Source = Microsoft.ApplicationServer.Caching.Client

  ErrorCode = 17

  SubStatus = 5

  StackTrace:

      在Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody)

      在Microsoft.ApplicationServer.Caching.DataCache.ExecuteAPI(RequestBody reqMsg,IMonitoringListener listener)

      在Microsoft.ApplicationServer.Caching.DataCache.InternalAdd(String键,对象的值,时间跨度超时,DataCacheTag []标签,字符串区域,IMonitoringListener听者)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;在Microsoft.ApplicationServer.Caching.DataCache。<> c__DisplayClass1。< Add> b__0()

      在Microsoft.ApplicationServer.Caching.MonitoringListenerFactory.EmptyListener.Microsoft.ApplicationServer.Caching.IMonitoringListener.Listen [TResult](Func`1 innerDelegate)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在Microsoft.ApplicationServer.Caching.DataCache.Add(String key,Object value)

      在testCaching.Program.PrepareClient()中d:\Program\SpikeAppFabric\testCaching\testCaching\Program.cs:线626

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ; at the testCaching.Program.Main(String [] args)in D:\Program\SpikeAppFabric\testCaching\testCaching\Program.cs:line 19

     ;&NBSP;&NBSP;在System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,String [] args)

      在Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean ignoreSyncCtx)

      在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback回调,对象状态)

      在System.Threading.ThreadHelper.ThreadStart()

  InnerException:System.ServiceModel.Security.SecurityNegotiationException

      消息=对SSPI的呼叫失败,请参阅内部异常。

      来源= mscorlib

       StackTrace:

        服务器堆栈跟踪:

           在System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(流流,SecurityMessageProperty&安培; remoteSecurity)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(流流)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator,IConnection&安培;连接,ClientFramingDecoder解码器,IDefaultCommunicationTimeouts
defaultTimeouts,TimeoutHelper&安培; timeoutHelper)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection连接,ArraySegment`1前导码,TimeoutHelper&安培; timeoutHelper)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;在System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection连接,TimeoutHelper&安培; timeoutHelper)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(时间跨度超时)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;在System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(时间跨度超时)

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)

           在Microsoft.ApplicationServer.Caching.CacheResolverChannel.Open(TimeSpan超时)

           在System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr的MD,对象[]指定参数时,对象服务器,的Int32

Microsoft.ApplicationServer.Caching.DataCacheException was unhandled
  HelpLink=http://go.microsoft.com/fwlink/?LinkId=164049
  Message=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. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.)
  Source=Microsoft.ApplicationServer.Caching.Client
  ErrorCode=17
  SubStatus=5
  StackTrace:
       at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody)
       at Microsoft.ApplicationServer.Caching.DataCache.ExecuteAPI(RequestBody reqMsg, IMonitoringListener listener)
       at Microsoft.ApplicationServer.Caching.DataCache.InternalAdd(String key, Object value, TimeSpan timeout, DataCacheTag[] tags, String region, IMonitoringListener listener)
       at Microsoft.ApplicationServer.Caching.DataCache.<>c__DisplayClass1.<Add>b__0()
       at Microsoft.ApplicationServer.Caching.MonitoringListenerFactory.EmptyListener.Microsoft.ApplicationServer.Caching.IMonitoringListener.Listen[TResult](Func`1 innerDelegate)
       at Microsoft.ApplicationServer.Caching.DataCache.Add(String key, Object value)
       at testCaching.Program.PrepareClient() in D:\Program\SpikeAppFabric\testCaching\testCaching\Program.cs:line 626
       at testCaching.Program.Main(String[] args) in D:\Program\SpikeAppFabric\testCaching\testCaching\Program.cs:line 19
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.ServiceModel.Security.SecurityNegotiationException
       Message=A call to SSPI failed, see inner exception.
       Source=mscorlib
       StackTrace:
         Server stack trace:
            at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
            at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
            at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
            at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
            at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
            at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
            at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
            at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
            at Microsoft.ApplicationServer.Caching.CacheResolverChannel.Open(TimeSpan timeout)
            at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32

&NBSP;&NBSP;&NBSP; ...

    ...

看起来存在安全问题,你有没有人指出我需要做下一步?

looks there is security issue, could you anyone point out i need to do next?

谢谢。

sanyorke

推荐答案

 您能否将Get-CacheClusterHealth cmdlet的输出粘贴到缓存管理系统PowerShell以及代码片段中,了解您如何构建DataCacheFactory和DataCache ?

 Can you please paste the output of Get-CacheClusterHealth cmdlet in cache admin powershell and also the code snippet on how you're constructing the DataCacheFactory and DataCache ?


这篇关于无法使用API​​添加缓存项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆