redis cluster nodes is reporting wrong self ip address

55 views
Skip to first unread message

Ravi Desai

unread,
Jun 15, 2021, 10:05:52 AM6/15/21
to Redis DB

i have setup redis cluster on 3 ubuntu 20 nodes with identical network configs. (eno1 interface for management and enp1s0f1 for internal network )

in the /etc/redis/redis.conf i have it bind to the enp1s0f1 interface like so in the 3 nodes

bind 172.19.101.2x

i then create the redis cluster like so

redis-cli --cluster create 172.19.101.23:6379 172.19.101.24:6379 172.19.101.25:6379

the cluster gets created ok and cluster info also reports OK

but when i do cluster nodes it reports the management ip instead of the internal ip just for 1 node like so.

administrator@slave-node2:~$ redis-cli -h 172.19.101.24 cluster nodes 33c4484ca50aa7916b8727723f4eb5576c7b94ab 172.19.101.25:6379@16379 master - 0 1623764502745 4 connected 10923-16383 
e099188cb0ae8bcc32ca7d81f0c8659a2b4ebb7b 10.110.3.166:6379@16379 myself,master - 0 1623764500000 3 connected 5461-10922 
3afa9cb15e166254a9f5182ba1b0df46137f954b 172.19.101.23:6379@16379 master - 0 1623764501741 2 connected 0-5460

So now when clients connect to this redis cluster they get this error - Can't connect to master: redis://10.110.3.166:6379 with slot ranges: [[5461-10922]]

BTW if i do redis-cli cluster nodes by connecting to other node in the cluster it reports ok like so

administrator@slave-node2:~$ redis-cli -h 172.19.101.25 cluster nodes e099188cb0ae8bcc32ca7d81f0c8659a2b4ebb7b 172.19.101.24:6379@16379 master - 0 1623765101198 3 connected 5461-10922 
3afa9cb15e166254a9f5182ba1b0df46137f954b 172.19.101.23:6379@16379 master - 0 1623765100194 2 connected 0-5460 
33c4484ca50aa7916b8727723f4eb5576c7b94ab 172.19.101.25:6379@16379 myself,master - 0 1623765099000 4 connected 10923-16383

So question is

  • why redis picking the management ip for this node ?
  • is there anyway to restrict it to required ip / interface ?
  • is there a way to change it in the cluster nodes ?

thanks for any pointers to this

Reply all
Reply to author
Forward
0 new messages