Cannot connect Redis Sentinel at RedisURI ERR AUTH <password> called without

解决:sentinel下面的password注释掉,如下:

spring:  
  redis:
    database: 0
    host: ip #哨兵模式无效
    lettuce:
      pool:
        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
      shutdown-timeout: 100ms
    password: 密码  #哨兵模式有效
    port: 8093
    sentinel:
      master: mymaster
      nodes: ip:端口,ip:端口,ip:端口
      #password: ***  # 哨兵未配置密码,所以注释这行,否则报错

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐