没有身份验证的Redis Sentinel只读从站

时间:2019-02-22 17:35:01

标签: redis redis-sentinel redis-py

设置:我有三台计算机,它们与Sentinel / Redis位于同一位置,与example-2完全相同,分别配置为sentinel auth-passmasterauth,{{1 }}。 -故障转移,读/写-一切正常。

要求:我想添加一个Redis从属服务器(Redis的第4个实例),该服务器不需要身份验证,但可以从主群集中进行复制。

问题:我的设置与the uncommon case where you need a slave that is accessible without authentication中的设置完全相同,即Master >> Slave,requirepass。 使用redis-py客户端时,我要求Sentinel读取从属服务器,并且选择了此replica-priority 0,但收到错误消息:no-auth-slave,并且连接被中止。我相信客户端只是从服务器传回错误。

我尝试过:

  • Master >> Slave,Client sent AUTH, but no password is set >> Slave,replica-priority 0。所有客户端,服务器,同步工作(因为Sentinel不了解此只读从属服务器)除外,但我每10s就会在Sentinel日志中获得replica-priority 0个条目。不确定这是否有关?
  • 使用Master >>(从站,+fix-slave-config)在“不常见的情况下...”中定义的设置,但是客户端错误,无法继续进行连接/请求。

问题:

  • Master >> Slave >>带有Sentinel replica-priority 0条目的Slave正常吗?
  • +fix-slave-config是一个错误/功能吗?

我绝对希望让Sentinel为HA知道所有Redis从站,但是不能混合使用auth / no-auth。

Redis 5.0.3,redis-py 3.2.0

0 个答案:

没有答案
相关问题