Spring Boot 2.2.1.REALEASE集成sentinel启动报错


 如题,springboot 2.2.1.RELEASE配置sentinel

spring:
  redis:
    database: 0
    password: 123456
    sentinel:
      master: a2a-master
      nodes:192.168.154.128:26379,192.168.154.129:26379,192.168.154.130:26379      

  

但是发现实际启动时确实报错

ERR client sent auth, but no password is set

再三检查redis.conf中的

  requirepass "123456"

  masterauth "123456"

  

和sentinel.conf的

sentinel auth-pass a2a-master 123456

一主二从和三个哨兵配置都没有问题,并且在redis-cli上面确实也是需要输入密码进行认证

因为之前有遇见过springboot2.2.0和mybatisplus3.5.2版本冲突的问题,所以考虑到会不会是当前springboot版本和redis的集成有问题,找了下还发现真是

https://github.com/spring-projects/spring-boot/issues/18942

将Springboot换成2.2.6之后,果真可以正常访问。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM