question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot connect to Service through gRPC.

See original GitHub issue

Expected 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, 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.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, Dictionary2 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](Func2 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, 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) 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, 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)

Steps to Reproduce the Problem

  1. have a service in k8s with the side car.
  2. have another service with REST API and dapr side car.
  3. 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:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
amanbhacommented, Apr 2, 2020

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.

0reactions
amanbhacommented, Mar 31, 2020

keeping it open till 0.6.0 is released if others stumble across this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot connect to my containerized gRPC server
1 Answer. To access a gRPC running in a docker container from another container you have to use DNS resolution.
Read more >
Troubleshoot gRPC on .NET
Mismatch between client and service SSL/TLS configuration; Call a gRPC service with an untrusted/invalid certificate; Call insecure gRPC ...
Read more >
Grpc csharp client Can't connect to Grpc server running on ...
I made a simple Grpc Server and client and ran them directly on localhost. The client is able to make the request to...
Read more >
Some clients can't connect to our server.
Hi. We have a gRPC based server on the internet and our own client software connecting to it at different customer sites. Quite...
Read more >
Re: Unable to connect to Cloud Run gRPC server
I'm trying to deploy a Cloud run gRPC server, by now I've accomplished the deployment but when I try to connect and call...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found