【问题标题】:Stunnel with Redis Sentinel使用 Redis Sentinel 进行 Stunnel
【发布时间】:2018-02-27 19:19:39
【问题描述】:

好吧,据说 Redis Setninels 现在可以使用 TLS。 我的主人和奴隶用 stunnel 复制得很好。 但是,我无法让哨兵互相交流 和大师一样。

我有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> 哨兵哨兵 redisftdev (空列表或集合) 127.0.0.1:26280>

我可以毫无问题地连接到远程 Sentinel,但我当然会得到相同的响应

127.0.0.1:8005> 哨兵哨兵 redisftdev (空列表或集合)

【问题讨论】:

  • 好的,我知道了。是的,Sentinel 与 Stunnel 一起工作。我正在使用 4.02。我没有宣布我的哨兵和奴隶的端口。
  • 特别 - sentinelannounce-port 8003 其中端口 8003 是客户端绑定的 127.0.0.1 端口接受 = 127.0.0.1:8003 连接 = 12.34.56.7:6379 与从站相同 redis.conf 从站-宣布端口 8000

标签: redis-sentinel stunnel


【解决方案1】:

很抱歉,这是新的 - 好的,我明白了。是的,Sentinel 与 Stunnel 一起工作。我正在使用 4.02。我没有宣布我的哨兵和奴隶的端口。 具体来说 - 哨兵宣布端口 8003

端口 8003 是 stunnel.conf 中客户端绑定的 127.0.0.1 端口 accept = 127.0.0.1:8003 connect = 12.34.56.7:6379

redis.conf 与从属服务器相同 slave-announce-port 8000

【讨论】:

  • 我们是否需要使用 stunnel 为哨兵宣布端口?
猜你喜欢
  • 2014-10-12
  • 1970-01-01
  • 1970-01-01
  • 2016-04-21
  • 2014-04-23
  • 2018-10-29
  • 2020-03-16
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多