@z_haseeb not sure what you are trying to setup here, are you trying to setup a redis cluster, since you mentioned total node = 3, or is it just 1 master with 2 slaves ?
Already followed same configurations which you shared in the web post above, but master unable to see slaves. However the slaves able to see Master
/etc/redis.conf [SLAVE FILE]
protected-mode no
port 6379
replicaof 192.168.3.134 6379
bind 127.0.0.1 192.168.3.237
supervised systemd
/etc/redis.conf [MASTER FILE]
protected-mode no
port 6379
bind 127.0.0.1 192.168.3.134
supervised systemd
Furthermore, I am also not able to connect from SLAVE to MASTER even the firewalld and selinux is disabled on all machines. Below is the reference:
SLAVE TO MASTER
[root@redis-c ~]# redis-cli -h 192.168.3.134 -p 6379
Could not connect to Redis at 192.168.3.134:6379: Connection refused
Could not connect to Redis at 192.168.3.134:6379: Connection refused
MASTER TO MASTER ITSELF
[root@redis-a ~]# redis-cli -h 192.168.3.134 -p 6379
Could not connect to Redis at 192.168.3.134:6379: Connection refused
Could not connect to Redis at 192.168.3.134:6379: Connection refused
Noted. I assume after binding to 0.0.0.0 it works?
The issue with Could not connect to Redis at 192.168.3.134:6379: Connection refused is due to network binding. If it’s bind to 127.0.0.1, only redis instances within the same machine (localhost) can connect.
Dear Team, my issue is resolved. Earlier I write all configurations at the top of replica’s and master machines configuration file. However right now I modify the configurations of Master and Replica’s at the line where the configurations exist. Suppose a setting is mentioned like protected-mode = yes then I modify it to no.
Unfortunately many users fail to protect Redis instances from being accessed from external networks. Many instances are simply left exposed on the internet with public IPs. For this reasons since version 3.2.0, when Redis is executed with the default configuration (binding all the interfaces) and without any password in order to access it, it enters a special mode called protected mode . In this mode Redis only replies to queries from the loopback interfaces, and reply to other clients connecting from other addresses with an error, explaining what is happening and how to configure Redis properly.