bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.97k stars 9.2k forks source link

Endless error Loop with Redis master TLS #18982

Closed CamiloPenagos99 closed 1 year ago

CamiloPenagos99 commented 1 year ago

Name and Version

bitnami/redis:17.14.5

What architecture are you using?

None

What steps will reproduce the bug?

  1. Install the helm chart for Redis on the kubernetes cluster
  2. Enable TLS
    enabled: true
    autoGenerated: true
    authClients: false
  3. Redis is working well however all the time is a error message
9:M 01 Sep 2023 16:35:52.356 # Error accepting a client connection: (null)
9:M 01 Sep 2023 16:35:52.360 # Error accepting a client connection: (null)
9:M 01 Sep 2023 16:35:52.432 # Error accepting a client connection: (null)
9:M 01 Sep 2023 16:35:52.508 # Error accepting a client connection: (null)
9:M 01 Sep 2023 16:35:52.508 # Error accepting a client connection: (null)
9:M 01 Sep 2023 16:35:52.564 # Error accepting a client connection: (null)
9:M 01 Sep 2023 16:35:52.654 # Error accepting a client connection: (null)
9:M 01 Sep 2023 16:35:52.661 # Error accepting a client connection: (null)

I can interact with Redis and Redis replicas, however, I get those message errors all of the time

Are you using any custom parameters or values?

I am using redis stack image so i need to load the modules for redis, i had to modify just a little the startup script However i did not touch anything with TLS

  ${CMD} \
          --port "0" \
          --requirepass "${REDIS_PASSWORD}" \
          --masterauth "${REDIS_PASSWORD}" \
          --include "/opt/bitnami/redis/etc/redis.conf" \
          --include "/opt/bitnami/redis/etc/master.conf" \
          --tls-port "${REDIS_TLS_PORT}" \
          --tls-cert-file "${REDIS_TLS_CERT_FILE}" \
          --tls-key-file "${REDIS_TLS_KEY_FILE}" \
          --tls-ca-cert-file "${REDIS_TLS_CA_FILE}" \
          --tls-auth-clients "${REDIS_TLS_AUTH_CLIENTS}" \
          --loadmodule /opt/redis-stack/lib/redisearch.so ${REDISEARCH_ARGS} \
          --loadmodule /opt/redis-stack/lib/redisgraph.so ${REDISGRAPH_ARGS} \
          --loadmodule /opt/redis-stack/lib/redistimeseries.so ${REDISTIMESERIES_ARGS} \
          --loadmodule /opt/redis-stack/lib/rejson.so ${REDISJSON_ARGS} \
          --loadmodule /opt/redis-stack/lib/redisbloom.so ${REDISBLOOM_ARGS}

What is the expected behavior?

Redis should be able to generate the self-signed certificates files for TLS with no problem and the error messages should not be there

Additional information

Since Redis master starts the error appears again and again, there are no clients connected to Redis or trying to create a connection. There is just the Redis master generating the same error again and again

However, the server is able to receive connections and handle them

juan131 commented 1 year ago

Hi @CamiloPenagos99

Could you please share the complete values.yaml you're using to install Redis chart? Also, regarding the modifications you did in the startup script, correct me if I'm wrong but I guess that you're using master.extraFlags parameter to do so, right? See:

CamiloPenagos99 commented 1 year ago

Hi @juan131 Thanks I am not using extraFlags

I defined a new configmap for loading redis stack modules based on this post: redis-stack-bitnami using extraDeploy flag

Here is my values.yaml

global:
  redis:
    password: ${redis_master_password}
image:
  repository: "redis/redis-stack-server"
  tag: ${redis_stack_tag_image}
master:
  kind: "StatefulSet"
  service:
    type: "LoadBalancer"
    ports:
      redis: 6380
  args:
    - -c
    - /opt/bitnami/scripts/merged-start-scripts/start-master.sh
  extraVolumes:
    - name: merged-start-scripts
      configMap:
        name: bitnami-redis-stack-server-merged
        defaultMode: 0755
  extraVolumeMounts:
    - name: merged-start-scripts
      mountPath: /opt/bitnami/scripts/merged-start-scripts
replica:
  service:
    ports:
      redis: 6380
  args:
    - -c
    - /opt/bitnami/scripts/merged-start-scripts/start-replica.sh
  extraVolumes:
    - name: merged-start-scripts
      configMap:
        name: bitnami-redis-stack-server-merged
        defaultMode: 0755
  extraVolumeMounts:
    - name: merged-start-scripts
      mountPath: /opt/bitnami/scripts/merged-start-scripts
tls:
  enabled: true
  autoGenerated: false
  authClients: false
  existingSecret: ${redis_stack_tls_secret}
  certFilename: "tls.crt"
  certKeyFilename: "tls.key"
  certCAFilename: "tls.crt"
extraDeploy:
  - apiVersion: v1
    kind: ConfigMap
    metadata:
      name: bitnami-redis-stack-server-merged
---------------- here the scripts----------------

About the scripts to startup master/slave i had to modify the original ones by adding

--loadmodule /opt/redis-stack/lib/redisearch.so ${REDISEARCH_ARGS} \
--loadmodule /opt/redis-stack/lib/redisgraph.so ${REDISGRAPH_ARGS} \
--loadmodule /opt/redis-stack/lib/redistimeseries.so ${REDISTIMESERIES_ARGS} \
--loadmodule /opt/redis-stack/lib/rejson.so ${REDISJSON_ARGS} \
--loadmodule /opt/redis-stack/lib/redisbloom.so ${REDISBLOOM_ARGS}

I replicated the behavior in the post above

juan131 commented 1 year ago

Hi @CamiloPenagos99

It seems you're installing the Bitnami Redis chart with an image (redis/redis-stack-server) that's not maintained by Bitnami. I'm afraid that we're not familiar with third-party images and, therefore, we cannot provide you support on this case.

That said, we will keep this ticket open until the stale bot closes it just in case someone from the community adds some valuable info.

github-actions[bot] commented 1 year ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 1 year ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.