gRPC 客户端从 Kestrel 服务器上运行的 gRPC 接收 Http2StreamException

问题描述

我在 Kestrel 上有 gRPC 服务器,在 WinForms 上有测试客户端。两者都是netcore 3.1。根据单独的要求,一切都好。 当我启动多个并行请求时,我看到以下错误

Status(StatusCode="Unavailable",Detail="Error reading next message. IOException: The request was aborted. Http2StreamException: The HTTP/2 server reset the stream. HTTP/2 error code 'INTERNAL_ERROR' (0x2).",DebugException="System.IO.IOException: The request was aborted.
 ---> System.Net.Http.Http2StreamException: The HTTP/2 server reset the stream. HTTP/2 error code 'INTERNAL_ERROR' (0x2).
   --- End of inner exception stack trace ---
   at System.Net.Http.Http2Connection.Http2Stream.CheckResponseBodyState()
   at System.Net.Http.Http2Connection.Http2Stream.TryReadFromBuffer(Span`1 buffer)
   at System.Net.Http.Http2Connection.Http2Stream.ReadDataAsync(Memory`1 buffer,HttpResponseMessage responseMessage,CancellationToken cancellationToken)
   at Grpc.Net.Client.StreamExtensions.ReadMessageAsync[TResponse](Stream responseStream,GrpcCall call,Func`2 deserializer,String grpcEncoding,Boolean singleMessage,CancellationToken cancellationToken)
   at Grpc.Net.Client.Internal.HttpContentClientStreamReader`2.MoveNextCore(CancellationToken cancellationToken)")

我需要建议。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)