好吧,据说 Redis Setninels 现在可以使用 TLS。我的主人和奴隶用 stunnel 复制得很好。但是,我无法让 Sentinel 与彼此以及 Master 进行交流。
我有 1 个主人、2 个奴隶和 3 个哨兵
我的 stunnel.conf 示例
pid = /run/stunnel.pid
output = /etc/stunnel/stunnel.log
[Redis server]
cert = /etc/stunnel/ABC_private.pem
accept = xxx.xx.160.77:26280
connect = 127.0.0.1:26280
[Client XYZ Redis Server]
client=yes
cert = /etc/stunnel/XYZ_private.pem
accept = 127.0.0.1:8000
connect = xxx.xx.161.78:6480
# SENTINEL SERVERS
[Client 123 Sentinel Server]
client=yes
cert = /etc/stunnel/123_private.pem
accept = 127.0.0.1:8001
connect = xxx.xx.160.77:26280
我的 Sentinel 配置示例
protected-mode no
bind 127.0.0.1
port 26280
sentinel monitor redisftdev 127.0.0.1 8002 2
当我在本地哨兵上运行以下命令时:
127.0.0.1:26280> sentinel sentinels redisftdev (空列表或设置) 127.0.0.1:26280>
我可以毫无问题地连接到远程哨兵,但我当然得到相同的响应
127.0.0.1:8005> sentinel sentinels redisftdev(空列表或设置)