1

I have an ASP.NET 6 application using Dapr. I works in the local development environment, but when I deploy it to Azure Container Apps, it is unable to reach the Dapr sidecar.

The application is defined in Bicep, with the following settings relevant to Dapr:

"dapr": {
  "enabled": true,
  "appId": "<redaced>",
  "appProtocol": "http",
  "appPort": 5032
}

The following environment variables are set on the container:

"env": [
  {
    "name": "DAPR_HTTP_PORT",
    "value": "3500"
  },
  {
    "name": "DAPR_GRPC_PORT",
    "value": "3500"
  }
]

I use the Dapr SDK, and make the following call: _daprClient.GetStateAsync<ICollection<string>>(STORE_NAME, KEY), which results in an exception with this message: ---> Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Connection refused (127.0.0.1:3500) SocketException: Connection refused", DebugException="System.Net.Http.HttpRequestException: Connection refused (127.0.0.1:3500).

The documentation for Azure Container Apps states that 3500 is the default port for the Dapr sidecar. Any ideas why this does not work?

Vidar Kongsli
  • 826
  • 2
  • 9
  • 20

0 Answers0