-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Cannot connect to Redis Sentinel using database greater 0 through Jedis #2103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report. The bug is on our side. Since the introduction of |
But is the bug on your side |
It's on our side. The next releases are scheduled for late July (https://calendar.spring.io/). |
…d for Sentinels. We now no longer configure the database number configured for data node access through JedisClientConfiguration instances that are used for Sentinel node connectivity. Previously, the configured database number lead to issuing a SELECT command on Sentinel that doesn't support database isolation. Fixes #2103.
…d for Sentinels. We now no longer configure the database number configured for data node access through JedisClientConfiguration instances that are used for Sentinel node connectivity. Previously, the configured database number lead to issuing a SELECT command on Sentinel that doesn't support database isolation. Fixes: #2103. Original Pull Request: #2112
Hello,
I have previously asked this question directly to the Jedis-team redis/jedis#2567 but I don't really understand what is happening here. There are a few questions that I need to get adressed.
1. Is it supposed to be possible to use Redis sentinels and a specific Redis database (db > 0)?
While trying to connect to Redis using Sentinel and having the database property set to any number greater than 0, the applicaiton crashes. (Spring Boot 2.5.1, Spring Data Redis 2.5.1, Jedis 3.6.0) It seems like the
new Jedis(hap.getHost(), hap.getPort(), sentinelConnectionTimeout, sentinelSoTimeout)
line insideJedisSentinelPool.java
in Jedis 3.6.0 crashes because we are trying to set the database number in redis sentinel rather than in the redis master node. See more in the jedis bug posted above.Example configuration:
2. If we are supposed to use Redis sentinels and a specific database (db > 0), then how do I configure that?
Since configuring the sentinelConfig with a database number breaks the application, where and when should I do it?
Thank you so much in advance.
Demo app is attached below that show the problem.
demo-app.zip
The text was updated successfully, but these errors were encountered: