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