我们无法确定为什么 Azure 的 BasicHttpRelay 偶尔会抛出一个没有任何详细信息的 FaultException。我们已启用 WCF 诊断跟踪,但可用的堆栈跟踪信息仍然相同。似乎 WCF 客户端通道会短暂失败,然后很快就会返回。
我们确实缓存了 WCF 通道(例如 CreateChannel),但这是我们第一次遇到这种奇怪的行为。我们有其他 Azure 服务总线中继解决方案,这种方法可以正常工作。
错误消息:
“在处理请求时遇到错误。”
堆栈跟踪:
通过调试,我们可以看到服务器正确响应消息请求(通过IDispatchMessageInspector),但客户端未能适当处理响应(IClientMessageInspector报告错误)。在似乎修正自身之后,后续的中继请求将成功。这些故障似乎是间歇性的,而不是负载驱动的。我们从未在Azure中继外使用
我们确实缓存了 WCF 通道(例如 CreateChannel),但这是我们第一次遇到这种奇怪的行为。我们有其他 Azure 服务总线中继解决方案,这种方法可以正常工作。
错误消息:
“在处理请求时遇到错误。”
堆栈跟踪:
在System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)处处理回复 在System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)处调用 在System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)处调用服务 在System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)处调用
[0]处重新抛出异常: 在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)处处理返回消息 在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)处私有调用 在[我们的WCF方法]...处FaultException - FaultCode Details:
Name: ServerErrorFault
Namespace: http://schemas.microsoft.com/netservices/2009/05/servicebus/relay
IsPredefinedFault: false
IsReceiverFault: false
IsSenderFault: falseSoap Message
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header />
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/netservices/2009/05/servicebus/relay">a:ServerErrorFault</faultcode>
<faultstring xml:lang="en-US">There was an error encountered while processing the request.</faultstring>
<detail>
<ServerErrorFault xmlns="http://schemas.microsoft.com/netservices/2009/05/servicebus/relay" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
通过调试,我们可以看到服务器正确响应消息请求(通过IDispatchMessageInspector),但客户端未能适当处理响应(IClientMessageInspector报告错误)。在似乎修正自身之后,后续的中继请求将成功。这些故障似乎是间歇性的,而不是负载驱动的。我们从未在Azure中继外使用
basicHttpBinding
看到这些错误。
有人有什么建议吗?我们正在使用Azure SDK 1.8。
我尝试使用owner
共享密钥配置了一个新的服务总线中继命名空间,但仍然看到相同的结果。