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之后,果真可以正常访问。

posted on 2020-04-06 21:41  不见雨潇潇  阅读(1039)  评论(0)    收藏  举报

导航