[bitnami/valkey] masterauth not getting set
Name and Version
docker.io/bitnami/valkey:8.0
What architecture are you using?
amd64
What steps will reproduce the bug?
Use the example compose file: https://github.com/bitnami/containers/blob/0fc18e7356cae428ed163b8dc11a756f60033040/bitnami/valkey/docker-compose-replicaset.yml
docker compose up -d
What is the expected behavior?
Master and replica sync
What do you see instead?
valkey 21:06:05.28 INFO ==>
valkey 21:06:05.28 INFO ==> Welcome to the Bitnami valkey container
valkey 21:06:05.28 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
valkey 21:06:05.28 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
valkey 21:06:05.28 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
valkey 21:06:05.28 INFO ==>
valkey 21:06:05.29 INFO ==> ** Starting Valkey setup **
valkey 21:06:05.30 INFO ==> Initializing Valkey
valkey 21:06:05.31 INFO ==> Setting Valkey config file
valkey 21:06:05.33 INFO ==> Configuring replication mode
valkey 21:06:05.36 INFO ==> ** Valkey setup finished! **
valkey 21:06:05.37 INFO ==> ** Starting Valkey **
1:C 15 Oct 2024 21:06:05.378 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:C 15 Oct 2024 21:06:05.378 * oO0OoO0OoO0Oo Valkey is starting oO0OoO0OoO0Oo
1:C 15 Oct 2024 21:06:05.378 * Valkey version=8.0.1, bits=64, commit=00000000, modified=1, pid=1, just started
1:C 15 Oct 2024 21:06:05.378 * Configuration loaded
1:S 15 Oct 2024 21:06:05.378 * monotonic clock: POSIX clock_gettime
1:S 15 Oct 2024 21:06:05.379 * Running mode=standalone, port=6379.
1:S 15 Oct 2024 21:06:05.379 * Server initialized
1:S 15 Oct 2024 21:06:05.386 * Creating AOF base file appendonly.aof.1.base.rdb on server start
1:S 15 Oct 2024 21:06:05.399 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
1:S 15 Oct 2024 21:06:05.399 * Ready to accept connections tcp
1:S 15 Oct 2024 21:06:05.399 * Connecting to PRIMARY valkey-primary:6379
1:S 15 Oct 2024 21:06:05.399 * PRIMARY <-> REPLICA sync started
1:S 15 Oct 2024 21:06:05.399 * Non blocking connect for SYNC fired the event.
1:S 15 Oct 2024 21:06:05.399 * Primary replied to PING, replication can continue...
1:S 15 Oct 2024 21:06:05.399 * (Non critical) Primary does not understand REPLCONF listening-port: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.399 * (Non critical) Primary does not understand REPLCONF ip-address: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * (Non critical) Primary does not understand REPLCONF capa: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * (Non critical) Primary does not understand REPLCONF VERSION: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * Partial resynchronization not possible (no cached primary)
1:S 15 Oct 2024 21:06:05.400 # Unexpected reply to PSYNC from primary: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * Retrying with SYNC...
1:S 15 Oct 2024 21:06:05.400 # PRIMARY aborted replication with an error: NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * Reconnecting to PRIMARY valkey-primary:6379 after failure
1:S 15 Oct 2024 21:06:05.400 * PRIMARY <-> REPLICA sync started
1:S 15 Oct 2024 21:06:05.400 * Non blocking connect for SYNC fired the event.
1:S 15 Oct 2024 21:06:05.400 * Primary replied to PING, replication can continue...
1:S 15 Oct 2024 21:06:05.400 * (Non critical) Primary does not understand REPLCONF listening-port: -NOAUTH Authentication required
1:S 15 Oct 2024 21:06:05.400 * (Non critical) Primary does not understand REPLCONF ip-address: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * (Non critical) Primary does not understand REPLCONF capa: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * (Non critical) Primary does not understand REPLCONF VERSION: -NOAUTH Authentication required.
1:S 15 Oct 2024 21:06:05.400 * Partial resynchronization not possible (no cached primary)
1:S 15 Oct 2024 21:06:05.400 # Unexpected reply to PSYNC from primary: -NOAUTH Authentication required.
Additional information
This line gets skipped: https://github.com/bitnami/containers/blob/0fc18e7356cae428ed163b8dc11a756f60033040/bitnami/valkey/8.0/debian-12/rootfs/opt/bitnami/scripts/libvalkey.sh#L281
Hi!
Are you able to authenticate with the primary node? Maybe the issue is in the master node
The master is working with the set password. But when running this on the slave the masterauth option is not set.
cat /opt/bitnami/valkey/etc/valkey.conf | grep auth
Hi @archef2000
Additional information
This line gets skipped:
https://github.com/bitnami/containers/blob/0fc18e7356cae428ed163b8dc11a756f60033040/bitnami/valkey/8.0/debian-12/rootfs/opt/bitnami/scripts/libvalkey.sh#L281
This code is executed. However, masterauth has been replaced by primaryauth in the configuration file. I will release a new image to fix the issue ASAP.
Release valkey-8.0.1-debian-12-r1 (#73523) fixes the issue by setting primaryauth.