如題,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之后,果真可以正常訪問。