pre

  • version 6.2.6

use utils/gen-test-certs.sh create key-crt.

conf

port                 6379
tls-port             6380

cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
requirepass 12345678

tls-cert-file        /tls/redis.crt
tls-key-file         /tls/redis.key
tls-ca-cert-file     /tls/ca.crt
tls-dh-params-file   /tls/redis.dh
tls-auth-clients     yes
tls-replication      yes
tls-cluster          yes

description

if i use tls config before create cluster, i will block that `Waiting for the cluster to join`
if i use tls config after create cluster, i will get `[(error) CLUSTERDOWN The cluster is down]`

What is the right func to create cluster with TLS??

Comment From: huangcuiyang

also with me, cluster stack in waiting node join .....................

Comment From: panla

also with me, cluster stack in waiting node join .....................

我遇到的问题经过研究后发现是 网络端口的问题,下面是文档中描述,使用 docker 的话需要使用 host 网络,与 tls 配置关系 不大。


目前,Redis群集不支持NATted环境,IP地址或TCP端口被重新映射。

Docker使用一种称为端口映射的技术:与程序认为使用的端口相比,在Docker容器内运行的程序可能会被暴露不同的端口。这对于在同一服务器上,同时运行多个使用相同端口的容器是非常有用的。

为了使Docker与Redis Cluster兼容,您需要使用Docker 的主机网络模式。有关更多信息,请查看Docker文档中的--net=host选项。