TLS加密后Redis主从不连接

时间:2018-12-11 10:17:11

标签: redis openssl haproxy

我在2台主机上通过以下配置设置了1个主机和1个从机:

版本Redis 3.2.9

常规主配置:

bind 127.0.0.1

port 6379

从站配置:

bind 127.0.0.1

port 6380

masterauth redispass

slaveof 127.0.0.1 6379

在haproxy中不使用ssl的配置效果很好。我可以在两个主机上同时连接主端口和从端口。所有健康检查均有效。设置并获取作品。

但是一旦我尝试在haproxy中卸载ssl,我会收到以下错误:

redis.log如下:

来自大师>>

13888:M 11 Dec 11:15:26.630 # Server started, Redis version 3.2.9
13888:M 11 Dec 11:15:26.631 * DB loaded from disk: 0.000 seconds
13888:M 11 Dec 11:15:26.631 * The server is now ready to accept connections on port 6379
13888:M 11 Dec 11:15:26.631 - DB 0: 6 keys (0 volatile) in 8 slots HT.
13888:M 11 Dec 11:15:26.631 - 0 clients connected (0 slaves), 1033720 bytes in use
13888:M 11 Dec 11:15:27.413 # Accepting client connection: accept: Software caused connection abort
13888:M 11 Dec 11:15:29.450 - Accepted 127.0.0.1:17235
13888:M 11 Dec 11:15:29.451 - Reading from client: Connection reset by peer

从奴隶:

3390:S 11 Dec 10:08:59.786 * Connecting to MASTER 127.0.0.1:6379
3390:S 11 Dec 10:08:59.786 * MASTER <-> SLAVE sync started
3390:S 11 Dec 10:08:59.787 * Non blocking connect for SYNC fired the event.
3390:S 11 Dec 10:09:03.840 # Accepting client connection: accept: Software caused connection abort
3390:S 11 Dec 10:09:05.105 - DB 0: 6 keys (0 volatile) in 8 slots HT.
3390:S 11 Dec 10:09:05.105 - 0 clients connected (0 slaves), 1033744 bytes in use
3390:S 11 Dec 10:09:05.794 # Error reply to PING from master: '-Reading from master: Software caused connection abort'

从haproxy统计信息中,它可以使L6和L4正常。

这可以是Redis配置的特定功能吗?我尚未将哨兵添加到此设置中。可能是什么问题?

0 个答案:

没有答案