Cannot connect to Service through gRPC.
See original GitHub issueExpected Behavior
trying to use InvokeMethodAsync to call my rest based backend using grpc (it works using http://localhost:3500/v1.0/invoke/daprbackend/method/WeatherForecast)
Actual Behavior
When I call using gRPC I get the following exception “Error starting gRPC call: An error occurred while sending the request.” full logs:
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: Status(StatusCode=Internal, Detail=“Error starting gRPC call: An error occurred while sending the request.”)
Grpc.Core.RpcException: Status(StatusCode=Internal, Detail=“Error starting gRPC call: An error occurred while sending the request.”)
at Dapr.Client.DaprClientGrpc.MakeGrpcCallHandleError[TResponse](Func2 callFunc, CancellationToken cancellationToken) at Dapr.Client.DaprClientGrpc.MakeInvokeRequestAsync(String appId, String methodName, Any data, Dictionary
2 metadata, CancellationToken cancellationToken)
at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](String appId, String methodName, Dictionary`2 metadata, CancellationToken cancellationToken)
at K8sFrontEnd.Pages.Counter.CallDaprBackendgRPCAsync() in /src/Pages/Counter.razor:line 63
at K8sFrontEnd.Pages.Counter.CallBothAsync() in /src/Pages/Counter.razor:line 71
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Status(StatusCode=Internal, Detail=“Error starting gRPC call: An error occurred while sending the request.”)
Grpc.Core.RpcException: Status(StatusCode=Internal, Detail=“Error starting gRPC call: An error occurred while sending the request.”)
at Dapr.Client.DaprClientGrpc.MakeGrpcCallHandleError[TResponse](Func2 callFunc, CancellationToken cancellationToken) at Dapr.Client.DaprClientGrpc.MakeInvokeRequestAsync(String appId, String methodName, Any data, Dictionary
2 metadata, CancellationToken cancellationToken)
at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](String appId, String methodName, Dictionary2 metadata, CancellationToken cancellationToken) at K8sFrontEnd.Pages.Counter.CallDaprBackendgRPCAsync() in /src/Pages/Counter.razor:line 63 at K8sFrontEnd.Pages.Counter.CallBothAsync() in /src/Pages/Counter.razor:line 71 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle) fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit 'fTlEX3hwLRWMCAnfeIQfE0UAVmomC9exgpxLA7sLJ9U'. Grpc.Core.RpcException: Status(StatusCode=Internal, Detail="Error starting gRPC call: An error occurred while sending the request.") at Dapr.Client.DaprClientGrpc.MakeGrpcCallHandleError[TResponse](Func
2 callFunc, CancellationToken cancellationToken)
at Dapr.Client.DaprClientGrpc.MakeInvokeRequestAsync(String appId, String methodName, Any data, Dictionary2 metadata, CancellationToken cancellationToken) at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](String appId, String methodName, Dictionary
2 metadata, CancellationToken cancellationToken)
at K8sFrontEnd.Pages.Counter.CallDaprBackendgRPCAsync() in /src/Pages/Counter.razor:line 63
at K8sFrontEnd.Pages.Counter.CallBothAsync() in /src/Pages/Counter.razor:line 71
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit ‘fTlEX3hwLRWMCAnfeIQfE0UAVmomC9exgpxLA7sLJ9U’.
Grpc.Core.RpcException: Status(StatusCode=Internal, Detail=“Error starting gRPC call: An error occurred while sending the request.”)
at Dapr.Client.DaprClientGrpc.MakeGrpcCallHandleError[TResponse](Func2 callFunc, CancellationToken cancellationToken) at Dapr.Client.DaprClientGrpc.MakeInvokeRequestAsync(String appId, String methodName, Any data, Dictionary
2 metadata, CancellationToken cancellationToken)
at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](String appId, String methodName, Dictionary`2 metadata, CancellationToken cancellationToken)
at K8sFrontEnd.Pages.Counter.CallDaprBackendgRPCAsync() in /src/Pages/Counter.razor:line 63
at K8sFrontEnd.Pages.Counter.CallBothAsync() in /src/Pages/Counter.razor:line 71
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Steps to Reproduce the Problem
- have a service in k8s with the side car.
- have another service with REST API and dapr side car.
- invoke the backend microservice using the dapr Client with the following code:
var client = new DaprClientBuilder().Build();
var metaData = new Dictionary<string, string>();
metaData.Add("http.verb", "GET");
daprgRPCstring = await client.InvokeMethodAsync<string>("daprbackend", "WeatherForecast", metaData);
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
0.6.0 release of dapr runtime and dotnet sdk is not available. Please try the latest versions, feel free to reopen if the issue still persists.
keeping it open till 0.6.0 is released if others stumble across this issue.