1

クラスターで実行されているサービスと通信しているときに、ProtocolExceptions が発生しています。メッセージと InnerException メッセージ:

System.ServiceModel.ProtocolException: You have tried to create a channel to a service that does not support .Net Framing.
---> System.IO.InvalidDataException: Expected record type 'PreambleAck', found '145'.

このサービスはローカルの開発クラスターで実行されており、サービスと正常に通信した後に例外がスローされます。

通信に使用するコードは次のとおりです。

var eventHandlerServiceClient = ServiceProxy.Create<IEventHandlerService>(eventHandlerTypeName, new Uri(ServiceFabricSettings.EventHandlerServiceName));
return await eventHandlerServiceClient.GetQueueLength();

再試行ロジックがあります (試行間の遅延が増加します)。しかし、この呼び出しは決して成功しません。そのため、サービスが障害状態にあり、回復できないようです。

アップデート

ログには次のエラーも表示されます。

connection 0x1B6F9EB0 localhost:64002-[::1]:50376 target 0x1B64F3C0: invalid frame: length=0x1000100,type=514,header=28278,check=0x742E7465

2015 年 12 月 14 日更新

この ProtocolException がスローされた場合、再試行は役に立ちません。何時間も待った後でも、まだ失敗します。

エンドポイントアドレスをログに記録します

var spr = ServicePartitionResolver.GetDefault();
var x = await spr.ResolveAsync(new Uri(ServiceFabricSettings.EventHandlerServiceName), 
        eventHandlerTypeName, 
        new CancellationToken());
var endpointAddress = x.GetEndpoint().Address;

解決されたエンドポイントは次のようになります

{"Endpoints":{"":"net.tcp:\/\/localhost:57999\/d6782e21-87c0-40d1-a505-ec6f64d586db\/a00e6931-aee6-4c6d-868a-f8003864a216-130945476153695343"}}        

このエンドポイントは、Service Fabric Explorer によって報告されるものと同じです。

表示されたログから、このサービスは機能しているように見えます (別の API メソッドを介して到達可能です) が、この特定の呼び出しは決して成功しません。

4

2 に答える 2