sewenew / redis-plus-plus

Redis client written in C++
Apache License 2.0
1.64k stars 351 forks source link

does redis plus plus support sentinels on redis 7.0.5 ? #432

Closed koohestani closed 1 year ago

koohestani commented 1 year ago

In my case I have 1 master, 4 slaves and 5 sentinels which they were working properly with redis 6.2 but after upgrading redis to 7.0.5 redis plus plus could not connect to the sentinels. when I create a sw::redis::Redis object then call ping function it throws an exception with message : "Failed to create connection with sentinel". meanwhile when I connect to the sentinels with redis-cli it works fine.

redis-cli -h redis-sentinel-1 -p 26381 SENTINEL get-master-addr-by-name mymaster
1) "redis-master"
2) "6381"

Environment:

sewenew commented 1 year ago

I did some test with Redis 7.0.5, redis-plus-plus works well. You can try the latest code on master branch, although the sentinel related code should not be modified since v1.3.3.

Also please check if you updated sentinel conf when updating sentinel to 7.0.5. For example, setting auth info for sentinel or Redis nodes? In that case, you might also need to update your application code with redis-plus-plus to set these new info.

Regards

koohestani commented 1 year ago

thank you, the problem is solved