- I have searched the issues of this repository and believe that this is not a duplicate.
Ⅰ. Issue Description
Seata1.4.2版本,接入Redis哨兵集群的时候,假如哨兵节点配置密码的话,jedis客户端接入失败,报权限认证失败的错误。jedis客户端不支持sentinel节点设置密码,JedisSentinelPool 类中,74行 sentinelPassword 项默认为null导致的。
假如将客户端改为spring-boot-starter-data-redis, 2.3.4.RELEASE版本以上可配置sentinelPassword
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
Just paste your stack trace here!
Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)
- xxx
- xxx
- xxx
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
- JDK version :
- Seata version:
- OS :
- Others:
8条答案
按热度按时间rhfm7lfc1#
@a364176773 您图中的密码是master和slave节点的密码,sentinel节点假如也设置了密码,jedis是不支持设置的,seata1.4.2里面是取不到sentinel节点的密码的
cgfeq70w2#
@a364176773 您图中的密码是master和slave节点的密码,sentinel节点假如也设置了密码,jedis是不支持设置的,seata1.4.2里面是取不到sentinel节点的密码的
明白了,你愿意提个pr来支持它吗?
xqkwcwgp3#
欧克,很荣幸能参与进来
mspsb9vt4#
client端没有使用redis,tc端的redis用的Jedis,跟spring-boot-starter-data-redis无关,如果你是client端连不上redissentinel,那么跟seata是无关的
4c8rllxm5#
是我上面的说明写的有点偏差,seata1.4.2版本里面用的是jedis,服务端配置redis哨兵模式的时候,假如哨兵节点设置了密码,seata服务端是连接不是redis的
14:04:47.094 WARN --- [ main] redis.clients.jedis.JedisSentinelPool : Cannot get master address from sentinel running @ ...:26379. Reason: redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required.. Trying next one.
Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: All sentinels down, cannot determine where is mymaster master is running...
at redis.clients.jedis.JedisSentinelPool.initSentinels(JedisSentinelPool.java:206)
at redis.clients.jedis.JedisSentinelPool.(JedisSentinelPool.java:112)
at redis.clients.jedis.JedisSentinelPool.(JedisSentinelPool.java:91)
at redis.clients.jedis.JedisSentinelPool.(JedisSentinelPool.java:85)
at redis.clients.jedis.JedisSentinelPool.(JedisSentinelPool.java:73)
at io.seata.server.storage.redis.JedisPooledFactory.getJedisPoolInstance(JedisPooledFactory.java:106)
at io.seata.server.storage.redis.JedisPooledFactory.getJedisInstance(JedisPooledFactory.java:134)
at io.seata.server.storage.redis.store.RedisTransactionStoreManager.readSession(RedisTransactionStoreManager.java:348)
at io.seata.server.storage.redis.store.RedisTransactionStoreManager.readSession(RedisTransactionStoreManager.java:389)
at io.seata.server.storage.redis.session.RedisSessionManager.findGlobalSessions(RedisSessionManager.java:185)
at io.seata.server.storage.redis.session.RedisSessionManager.allSessions(RedisSessionManager.java:175)
at io.seata.server.session.SessionHolder.reload(SessionHolder.java:143)
at io.seata.server.session.SessionHolder.init(SessionHolder.java:130)
at io.seata.server.Server.main(Server.java:80)
c6ubokkw6#
7gs2gvoe7#
g6baxovj8#