Could Add more prompt when connect to redis sentinel failed?

66 views
Skip to first unread message

Nanana Hei

unread,
Dec 26, 2020, 7:25:39 AM12/26/20
to Jedis
Hello, guys

When someone use jedis 2.9.4 connect to redis sentinel(version 4.0.14), It's ok.

After redis sentinel update to 5.0.10, May be some failed would happen like follow.

Cannot get master address from sentinel running @ 192.168.72.129:26379.
Reason: redis.clients.jedis.exceptions.JedisConnectionException:
Failed connecting to host 192.168.72.129:26379. Trying next one. redis.clients.jedis.exceptions.JedisConnectionException:
All sentinels down, cannot determine where is mymaster master is running...  

The reason is that redis sentinel's auth. 


We know that redis sentinel add auth in version 5.0.1

But user may not know, he/she will try to update jedis's version to newest.

Through the sentinel's auth has been fix in  #2154 #2077, but user may not pass sentinel's password because the origin code not do it.

Could add more prompt to help users when they fail to connect with sentinel?

A warn log when they not setup sentinel's password.

I have been consum 2 days for find why I cannot conntect to sentinel(when redis version from 4.0.14 to 5.0.10), maybe others will meet trouble same as mine.

Allan Wax

unread,
Dec 27, 2020, 12:27:14 AM12/27/20
to Jedis
Have you tried redoing your test with a Redis Cluster (not an Amazon cluster, a true Redis Cluster)

Nanana Hei

unread,
Dec 29, 2020, 7:20:06 AM12/29/20
to Jedis

The problem haven been solved after I add sentinel's password.

Could add some warning when user's sentinel's password is null?

That's could be great for a user like me, who doesn't know enough with redis(i.e AUTH (>= 5.0.1) need sentinel password).
Reply all
Reply to author
Forward
0 new messages