1

I have Dapr sample Counter application which working fine with local redis server, but if I try to connect with "Azure redis for cache" I am getting time out error.

My yaml file with sample azure redis connection string

enter image description here

Time out error

enter image description here

Need suggestion on the yaml file either I have configured properly or not.

1 Answers1

-1

According to your YAML file, the problem appears to be the metadata value, which should be localhost and port 6379. This was a time-out issue; ensure that relay ports are enabled.

 metadata:
  - name: redisHost
    value: localhost:6379

NOTE: In this self-hosted mode, verify whether the component files are automatically created or not.

  **Windows**:  `%USERPROFILE%\.dapr\components\`
  **Linux/MacOS**:  `$HOME/.dapr/components`

refer below tutorial for more details.

Swarna Anipindi
  • 792
  • 2
  • 9
  • Hi, if I use "value: localhost:6379" its working fine, problem is happening only when try to connect to the Azure redis cache using the connecting string. Can you provide some YAML sample with connecting to Azure. – karthickShanmugaiah Jan 05 '23 at 05:42
  • Find the same connection string under Kubernetes tab on above Tutorial. metadata: - name: redisHost value: - name: redisPassword – Swarna Anipindi Jan 05 '23 at 06:17
  • @Swarana Thanks for the details, problem is I have used the azure redis password directly in the place of "secretKeyRef", instead of using it in "redisPassword" with value also enableTLS flag need to be set when using the azure. EX: `apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: statestore spec: type: state.redis version: v1 metadata: - name: redisHost value: Azurehost.redis.cache.windows.net:6380 - name: redisPassword value: - name: enableTLS value: true ` – karthickShanmugaiah Jan 05 '23 at 12:08