Keda: error parsing redis metadata: no address given or host given

Created on 1 Jul 2020  路  6Comments  路  Source: kedacore/keda

Keda is not able to read Redis metadata ( address OR host+port) even though they are defined clearly in the scaled object.

Expected Behavior

Keda is able to scale in/out the deployment based on Redis list size..

And keda-operator deployment logs are

"error":"error getting scaler for trigger #0: error parsing redis metadata: no address given or host given. Address should be in the format of host:port or you should provide both host and port",

Actual Behavior

Keda is not able at all to read Redis from trigger's metadata

Steps to Reproduce the Problem

  1. Run Keda operator from image docker.io/kedacore/keda:1.4.1
  2. Deploy the ScaledObject :

    ```sh
    apiVersion: keda.k8s.io/v1alpha1
    kind: ScaledObject

    ....

    spec:
    cooldownPeriod: 30
    maxReplicaCount: 10
    minReplicaCount: 1
    pollingInterval: 15
    scaleTargetRef:
    deploymentName: queue-worker-academy-laravel
    scaleType: deployment
    triggers:

    • metadata:
      databaseIndex: "0"
      enableTLS: "false"
      address: redis-master.apps-system:6379
      listLength: "3"
      listName: queues:default
      type: redis

## Specifications

  - **KEDA Version:*`image: docker.io/kedacore/keda:1.4.1`*  Keda is installed [from the Helm repository](https://kedacore.github.io/charts/index.yaml)

helm -n kube-system list

NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
keda kube-system 1 2020-07-01 00:00:48.04236 +0300 +03 deployed keda-1.4.2 1.4.1
```

  • Platform & Version: kubernetes 1.16
  • Kubernetes Version: kubernetes 1.16
  • Scaler(s): keda.k8s.io/v1alpha1

More

Similar to #560 .. but it is still persistent

bug

All 6 comments

Hi @abdennour, I found it very confusing, but address should actually reference the env var that contains the address in the target container... It should not be an address. Can you try that?

Ah! really ?
so if we will haveaddress: REDIS_ADDRESS..
This means REDIS_ADDRESS is an environment variable assigned to pods of the reference deployment .
In this case, REDIS_ADDRESS must be defined in queue-worker-academy-laravel.
Please correct me if i am mistaken ?
Also, what is the right syntax:

  • address: REDIS_ADDRESS
  • or address: ${REDIS_ADDRESS}

@abdennour yeah that's correct, address: REDIS_ADDRESS should get it done

thank you @eexwhyzee . I will give it a trial

Did it fix your issue?

We will test it !

Was this page helpful?
0 / 5 - 0 ratings