微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决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 举报,一经查实,本站将立刻删除。