Skip to content
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

Seata接入Redis哨兵集群失败 #4161

Closed
1 task
zzhangzd opened this issue Nov 30, 2021 · 10 comments · Fixed by #5930
Closed
1 task

Seata接入Redis哨兵集群失败 #4161

zzhangzd opened this issue Nov 30, 2021 · 10 comments · Fixed by #5930
Assignees

Comments

@zzhangzd
Copy link

  • 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)

  1. xxx
  2. xxx
  3. xxx

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version :
  • Seata version:
  • OS :
  • Others:
@funky-eyes
Copy link
Contributor

client端没有使用redis,tc端的redis用的Jedis,跟spring-boot-starter-data-redis无关,如果你是client端连不上redissentinel,那么跟seata是无关的

@zzhangzd
Copy link
Author

是我上面的说明写的有点偏差,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)

@funky-eyes
Copy link
Contributor

image

@funky-eyes
Copy link
Contributor

image

@zzhangzd
Copy link
Author

zzhangzd commented Dec 1, 2021

image

@zzhangzd
Copy link
Author

zzhangzd commented Dec 1, 2021

@a364176773 您图中的密码是master和slave节点的密码,sentinel节点假如也设置了密码,jedis是不支持设置的,seata1.4.2里面是取不到sentinel节点的密码的
image

@funky-eyes
Copy link
Contributor

@a364176773 您图中的密码是master和slave节点的密码,sentinel节点假如也设置了密码,jedis是不支持设置的,seata1.4.2里面是取不到sentinel节点的密码的 image

明白了,你愿意提个pr来支持它吗?

@zzhangzd
Copy link
Author

zzhangzd commented Dec 3, 2021

欧克,很荣幸能参与进来

@funky-eyes
Copy link
Contributor

@zzhangzd 还在吗?这个pr还没提呦

@PeppaO
Copy link
Contributor

PeppaO commented Oct 13, 2023

plz assign to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants