-
Notifications
You must be signed in to change notification settings - Fork 361
Open
Labels
Milestone
Description
Expected Behavior
I expected the Dapr .NET SDK to communicate over HTTP when explicitly configured with UseHttpEndpoint
, without requiring gRPC-related environment variables (DAPR_GRPC_PORT
, DAPR_GRPC_ENDPOINT
).
Actual Behavior
- With only HTTP environment variables set (
DAPR_HTTP_PORT
,DAPR_HTTP_ENDPOINT
), the client throws connection refused errors. - The client only works after adding gRPC environment variables, even though my code is configured to use HTTP.
- This suggests that the SDK may be defaulting to gRPC communication, ignoring the explicit HTTP configuration.
Steps to Reproduce the Problem
-
Create a
.NET
service with the following Dapr client configuration:builder.Services.AddDaprClient(daprClientBuilder => { var daprHttpPort = builder.Configuration.GetValue<string>("DAPR_HTTP_PORT") ?? "3500"; daprClientBuilder.UseHttpEndpoint($"http://channelservice-api-dapr:{daprHttpPort}"); daprClientBuilder.UseTimeout(TimeSpan.FromSeconds(60)); });
-
Run the service in Docker Compose with only HTTP env variables:
environment:
- DAPR_HTTP_PORT=3500
- DAPR_HTTP_ENDPOINT=http://channelservice-api-dapr:3500
Result: Client fails with connection refused.
- Add gRPC env variables to the same service:
environment:
- DAPR_GRPC_PORT=50002
- DAPR_GRPC_ENDPOINT=http://channelservice-api-dapr:50002
- DAPR_HTTP_PORT=3500
- DAPR_HTTP_ENDPOINT=http://channelservice-api-dapr:3500
Result: Client starts working, despite code being configured to use HTTP.