gRPC的.netClient客户端第一次连接出现StatusCode=Unavailable的解决办法?

博客详细描述了在使用基于.Net Framework的程序中遇到的gRPC连接问题,特别是Grpc.Core版本1.4.1时出现的自动连接失败与错误提示。作者尝试重新调用以解决此问题,并建议升级到gRPC新版本1.12.0来尝试修复。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.问题还原:

The service does not automatically connect, free after a period of time, the first call will appear the following error, next to normal.

The program is based on.Net Framework, The Grpc.Core version is 1.4.1.

Grpc.Core.RpcException: Status(StatusCode=Unavailable, Detail="Endpoint read failed")
   在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   在 Grpc.Core.Internal.AsyncCall`2.UnaryCall(TRequest msg)
   在 Grpc.Core.Calls.BlockingUnaryCall[TRequest,TResponse](CallInvocationDetails`2 call, TRequest req)
   在 Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)
   在 Grpc.Core.Internal.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method`2 method, String host, CallOptions options, TRequest request)

The document says I can try again. Isn't this supposed to be implemented internally in grpc.core?

image

 

使用新版本试试:This issue looks stale and it is not clear what the intent was. Also 1.4.1 is pretty old, feel free to try with 1.12.0 and if you are still seeing a problem, file this as a new issue.

 

 

转载于:https://www.cnblogs.com/x-poior/p/9929985.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值