Skip to content

RedisException: NOAUTH Authentication required

Summary

Deploying chart with Redis enabled I see the following log output after pods come up:

[11-Dec-2020 11:33:29 UTC] RedisException: NOAUTH Authentication required. in /var/www/wp-content-mount/object-cache.php:441
Stack trace:
#0 /var/www/wp-content-mount/object-cache.php(441): Redis->ping()
#1 /var/www/wp-content-mount/object-cache.php(173): WP_Object_Cache->__construct(true)
#2 /var/www/html/wp-includes/load.php(580): wp_cache_init()
#3 /var/www/html/wp-settings.php(133): wp_start_object_cache()
#4 /var/www/html/wp-config.php(106): require_once('/var/www/html/w...')
#5 /var/www/html/wp-load.php(37): require_once('/var/www/html/w...')
#6 /var/www/html/wp-login.php(12): require('/var/www/html/w...')
#7 {main}
10.42.0.1 - - [11/Dec/2020:11:33:29 +0000] "GET /wp-login.php HTTP/1.1" 200 2230 "-" "kube-probe/1.19"

Output from kubectl logs -l "app=wordpress" -f repeats every few seconds.

Version of the helm chart

0.1.5

Version of the images

  1. Init container image: index.docker.io/jhabdas/wordpress-cli-ansible:0.1.5
  2. Container image: index.docker.io/jhabdas/wordpress:0.1.5

These are copies of your 0.1.5 images to save you bandwidth.

Steps to reproduce

  1. Complete mandatory fields in values-local.yaml
  2. Enable Redis and set a password
  3. Deploy the chart

Expected behaviour

No repeating error message in the logs.

Actual behaviour

An error repeats in the logs associated with wordpress-cron-caller.

Relevant logs and/or screen shots

Output of kubectl get pods:

NAME                                     READY   STATUS      RESTARTS   AGE
wordpress-production-redis-master-0      1/1     Running     0          53m
wordpress-production-database-master-0   1/1     Running     0          53m
wordpress-production-1607684940-xjhzh    0/1     Completed   0          52m
wordpress-production-database-slave-0    1/1     Running     0          53m
wordpress-production-0                   1/1     Running     0          53m
wordpress-production-1607687640-2r84k    0/1     Error       0          7m44s
wordpress-production-1607687640-qz4s6    0/1     Error       0          7m40s
wordpress-production-1607687820-qrsh7    0/1     Error       0          4m44s
wordpress-production-1607687820-td5rl    0/1     Error       0          4m39s
wordpress-production-1607688000-qk2rx    0/1     Error       0          103s
wordpress-production-1607688000-px6rf    0/1     Error       0          99s

Introspecting with:

kubectl describe pod/wordpress-production-1607687460-gg5dc

Shows the following events but a State of Terminated with Reason of Error.

Events:
  Type    Reason     Age    From               Message
  ----    ------     ----   ----               -------
  Normal  Scheduled  3m     default-scheduler  Successfully assigned default/wordpress-production-1607687460-gg5dc to k3d-k3s-wordpress-server-0
  Normal  Pulling    2m59s  kubelet            Pulling image "bitnami/kubectl:1.18"
  Normal  Pulled     2m57s  kubelet            Successfully pulled image "bitnami/kubectl:1.18" in 2.668132209s
  Normal  Created    2m57s  kubelet            Created container wordpress-cron-caller
  Normal  Started    2m57s  kubelet            Started container wordpress-cron-caller

Redis configuration used:

redis:
  enabled: true
  password: REDACTED
  master:
    persistence:
      enabled: false
    disableCommands: []
  cluster:
    enabled: false

Image associated with erroring pods bitnami/kubectl:1.18