change of password

156 views
Skip to first unread message

Chen Teng-Jun

unread,
Sep 25, 2015, 3:34:32 AM9/25/15
to Redis DB
Hi,

i have this architechure in production environment:

1 Master 2 slaves  + 3 sentinels

If we want to change the password in redis.conf(requirepass, masterauth.) , and sentinel.conf, (sentinel auth-pass <master-name> <password>)

do you have a procedure which doesn't impact the database availibility?


Thanks

Josiah Carlson

unread,
Sep 25, 2015, 12:32:19 PM9/25/15
to redi...@googlegroups.com
If your clients have already been authenticated in the past, they don't need to re-authenticate. If they haven't, you will have unavailability. See an interaction below.

 - Josiah

127.0.0.1:6379> config set requirepass ""
OK
josiah@josiah-linux ~:$ redis-cli
127.0.0.1:6379> set foo 1
OK
127.0.0.1:6379> config set requirepass test
OK
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth test
OK
"1"
127.0.0.1:6379> config set requirepass test2
OK
"1"
josiah@josiah-linux ~:$ redis-cli
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth test2
OK
"1"
127.0.0.1:6379> config set requirepass ""
OK
"1"


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Chen Teng-Jun

unread,
Sep 28, 2015, 3:48:20 AM9/28/15
to Redis DB
Hello Josiah , thank you for your precious help

With config set requirepass, my redis.conf and sentinel.conf didn't change the password,

And I need launch "config set requirepass" on my master and all slaves?

Josiah Carlson

unread,
Sep 28, 2015, 2:17:26 PM9/28/15
to redi...@googlegroups.com
You either need to instruct sentinel/Redis to rewrite the configuration via 'CONFIG REWRITE' in Redis 2.8+, or you need to update the configuration manually.

 - Josiah

Chen Teng-Jun

unread,
Sep 30, 2015, 3:41:01 AM9/30/15
to Redis DB
I'm using a java client "Jedis", I have got a error : Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR invalid password, after changing the password...

Josiah Carlson

unread,
Sep 30, 2015, 1:22:47 PM9/30/15
to redi...@googlegroups.com
Your error tells you what you need to do: you need to change the password your clients use to connect to Redis.

 - Josiah
Reply all
Reply to author
Forward
0 new messages