➜ bin git:(stable) redis-cli -h 127.0.0.1 -p 6379
127.0.0.1:6379> auth your_secret_password
(error) ERR AUTH
Comment From: sundb
please eleborate your question.
Comment From: caosuyang
The problem has been identified. The password of the default user needs to be configured; otherwise, the connection cannot be established.
Comment From: Vignesh-Jothi
This indicates that the Redis server is not configured to require a password for authentication.
Solution:
To resolve this issue, follow these steps:
- Locate the Redis configuration file (
redis.conf). - Edit the file to set the
requirepassdirective with your desired password. - Restart the Redis server to apply the changes.
- Authenticate using the
redis-cliwith the configured password.
Detailed Steps:
- Open the Redis configuration file in your preferred text editor:
sh
sudo nano /etc/redis/redis.conf
- Find and set the
requirepassdirective:
plaintext
# requirepass foobared
requirepass your_secret_password
- Save and close the file, then restart the Redis server:
sh
sudo systemctl restart redis
- Authenticate with the Redis server:
sh
redis-cli -h 127.0.0.1 -p 6379
127.0.0.1:6379> auth your_secret_password
OK
Hope this helps anyone facing the same issue!
Comment From: caosuyang
➜ NFTurbo_Server git:(ryancao/development) redis-cli -h 127.0.0.1 -p 6379 127.0.0.1:6379> config set requirepass 12345678 OK 127.0.0.1:6379> config get requirepass 1) "requirepass" 2) "12345678" 127.0.0.1:6379>
Comment From: paoloose
For me the error was that I was providing a password when no password was really needed. Redis Docker container is created without a password by default.
Comment From: pratiyushpushkar05
Hi , We incountered this issue while upgrading argocd from 6.7.18 (redis 7.0.15) to 7.7.14 (redis 7.4.1). So during rolling upgrade , one of the redis-server fails out with
Connecting to MASTER , MASTER <-> REPLICA sync started , Non blocking connect for SYNC fired the event. Master replied to PING, replication can continue... Unable to AUTH to MASTER: -ERR AUTH <password> called without any password configured for the default user.
With this , upgrade fails (timesout) On manually redeploying argocd , it passes and HA argocd gets deployed with upgraded redis . My redis conf is default redis config of argocd in both case .
redis.conf:
│ ----
│ dir "/data"
│ port 6379
│ rename-command FLUSHDB ""
│ rename-command FLUSHALL ""
│ bind 0.0.0.0
│ maxmemory 0
│ maxmemory-policy volatile-lru
│ min-replicas-max-lag 5
│ min-replicas-to-write 1
│ rdbchecksum yes
│ rdbcompression yes
│ repl-diskless-sync yes
│ save ""
│ requirepass replace-default-auth
│ masterauth replace-default-auth
My question is why does restart works with above config?And why not the first upgrade ?
Just tested from nonHA argocd (single redis and these configs not present) to HA argocd (configs were created first time) , redis-replicas were successfully synced with master one even with masterauth replace-default-auth set as this .