连接到服务器时出现gRPC RpcException

时间:2019-08-01 15:25:02

标签: c# rpc grpc

我有一个gRPC服务器和客户端(在C#中)。服务器已启动并正在运行(已通过https://github.com/njpatel/grpcc的grpcc进行了测试)。但是只要我尝试与客户建立联系。我收到以下错误。

  

Grpc.Core.RpcException:状态(StatusCode =已取消,Detail =“已取消”)     在System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()处     在System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess处(任务任务)     在System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification处(任务任务)     在System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(任务任务)处     在at。System.Runtime.CompilerServices.TaskAwaiter 1.GetResult() at at Grpc.Core.Internal.AsyncCall 2.UnaryCall(TRequest msg)     在at at Grpc.Core.Calls.BlockingUnaryCall [TRequest,TResponse](CallInvocationDetails 2 call, TRequest req) at at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method 2方法,字符串主机,CallOptions选项,TRequest请求)     在at at Grpc.Core.Interceptors.InterceptingCallInvoker.b__3_0 [TRequest,TResponse](TRequest请求,ClientInterceptorContext 2 ctx) at at Grpc.Core.ClientBase.ClientBaseConfiguration.ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse](TRequest request, ClientInterceptorContext 2上下文,BlockingUnaryCallContinuation 2 continuation) at at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse](Method 2方法,字符串主机,CallOptions选项,TRequest请求)     在C:\ Projects \ Haacht \ Haacht \ Haacht \ Haacht.Common \ obj \ Debug \ SecurityGrpc.cs:122中的Security.SecurityService.SecurityServiceClient.Login(用户请求,CallOptions选项)处     在Security.SecurityService.SecurityServiceClient.Login(用户请求,元数据标头,可空1 deadline, CancellationToken cancellationToken) in C:\Projects\Haacht\Haacht\Haacht\Haacht.Common\obj\Debug\SecurityGrpc.cs:118 at Haacht.Web.Controllers.LoginController.<>c__DisplayClass1_0.<Login>b__0(Channel channel) in C:\Projects\Haacht\Haacht\Haacht\Haacht.Web\Controllers\LoginController.cs:30 at Haacht.Web.Controllers.MesController.<InvokeServiceAsync>d__2 1.MoveNext()在C:\ Projects \ Haacht \ Haacht \ Haacht \ Haacht.Web \ Controllers \ MesController.cs:25 < / p>

不知道是什么引起了这个错误,StackTrace也没有给我太多信息。在我重新安装到新计算机上之前,此方法工作正常。

0 个答案:

没有答案