我有一个具有6个节点的redis集群设置。我的目的是创建一个具有3个主节点和3个从属节点的redis cluswter。 当容器上线时,我发现一切都健康。 要创建Redis集群,节点应相互满足。我们使用
redis-cli -h localhost -p 6379 CLUSTER MEET <anotherRedisNodeIPHere>
见到成员后,我看到群集节点开始出现故障。但是我看到容器很健康。我能够到达报告为已断开连接/失败的容器。我已经用nc -v -z
进行了测试
/data # redis-cli cluster nodes
ade3913f5090139561ea2a74f17bcef85c307ea0 10.1.85.30:6379@6380 master,fail - 1554262202380 1554262200976 2 disconnected
e78b7163358e15049203515ecece494c57b740aa 10.1.55.18:6379@16379 master - 0 1554262244795 0 connected
67faf0f7dc850feb10efc5581fbfefaab7a50b74 10.1.92.10:6379@6380 myself,master - 0 1554262240000 3 connected 5462-10922
035eb05277da4c4a64d880c6f1d36f7a1ba169f8 10.1.69.12:6379@6380 master,fail? - 1554262237565 1554262234764 1 disconnected 0-5461
02d3cd64160f9cfc8f08388e354625f13f9d7f0e 10.1.40.9:6379@16379 master - 0 1554262243792 0 connected
af0b93a323344fcb1c07d9495ffa4f76db970cc2 10.1.28.13:6379@16379 master - 0 1554262241783 0 connected
/data # nc -v -z 10.1.85.30 6379
10.1.85.30 (10.1.85.30:6379) open
Redis日志报告节点IP已更改。
2019-04-03T03:53:57.127067001Z 92:M 03 Apr 2019 03:53:57.126 * Marking node 02d3cd64160f9cfc8f08388e354625f13f9d7f0e as failing (quorum
2019-04-03T03:53:57.476008101Z localhost (127.0.0.1:6379) open
2019-04-03T03:53:59.365777578Z 92:M 03 Apr 2019 03:53:59.365 # Address updated for node e78b7163358e15049203515ecece494c57b740aa, now 10
2019-04-03T03:54:00.429438293Z 92:M 03 Apr 2019 03:54:00.429 * Clear FAIL state for node 02d3cd64160f9cfc8f08388e354625f13f9d7f0e: maste
2019-04-03T03:54:06.858177261Z 92:M 03 Apr 2019 03:54:06.858 * Marking node e78b7163358e15049203515ecece494c57b740aa as failing (quorum
2019-04-03T03:54:07.461892722Z 92:M 03 Apr 2019 03:54:07.461 * Clear FAIL state for node e78b7163358e15049203515ecece494c57b740aa: maste
2019-04-03T03:54:08.448760366Z 92:M 03 Apr 2019 03:54:08.448 # Address updated for node 02d3cd64160f9cfc8f08388e354625f13f9d7f0e, now 10
2019-04-03T03:54:08.676900521Z 92:M 03 Apr 2019 03:54:08.676 # Address updated for node af0b93a323344fcb1c07d9495ffa4f76db970cc2, now 10
2019-04-03T03:54:11.472987305Z 92:M 03 Apr 2019 03:54:11.472 # Address updated for node 035eb05277da4c4a64d880c6f1d36f7a1ba169f8, now 10
我什至试图在redis.conf文件中添加以下设置
cluster-announce-port 6379
cluster-announce-bus-port 6380
bind 10.1.92.10 127.0.0.1
cluster-announce-ip 10.1.92.10
但是它没有帮助。你能让我知道如何解决这个问题吗? 谢谢
我正在使用Redis运行
/usr/local/bin/docker-entrypoint.sh redis-server /conf/redis.conf
我希望群集节点IP保持不变。