2

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 Answer 1

-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.

Sign up to request clarification or add additional context in comments.

3 Comments

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.
Find the same connection string under Kubernetes tab on above Tutorial. metadata: - name: redisHost value: <REPLACE WITH HOSTNAME redis-master.default.svc.cluster.local:6379> - name: redisPassword
@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: <Azure password> - name: enableTLS value: true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.