How to set http port & force client to use http not grpc
See original GitHub issueawait client.SaveStateAsync(storeName, stateKeyName, state, cancellationToken: cancellationToken);
I’m getting this crashing error, but I don’t want to use grpc, I want to use http.
| Message | “Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: No connection could be made because the target machine actively refused it. SocketException: No connection could be made because the target machine actively refused it.", DebugException="System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it.\r\n —> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.\r\n at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\r\n — End of inner exception stack trace —\r\n at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpConnectionPool.GetHttp2ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\r\n at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n at Grpc.Net.Client.Internal.GrpcCall2.RunCall(HttpRequestMessage request, Nullable
1 timeout)")” | string
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top GitHub Comments
We don’t provide an option to configure what protocol the SDK does (except service invocation). Can you tell us more about the scenario and why you think this is important?
So for this approach to work, you’ll need to expose a port for grpc to and from the sidecar, and then configure that in your application or via the
DAPR_GRPC_PORT
or use the default (50001)