Using homebrew to install Redis but when I try to ping Redis it shows this error:
Could not connect to Redis at 127.0.0.1:6379: Connection refused
First you need to up/start the all the redis nodes using below command, one by one for all conf files. @Note : if you are setting up cluster then you should have 6 nodes, 3 will be master and 3 will be slave.redis-cli will automatically select master and slave out of 6 nodes using --cluster command as shown in my below commands.
[xxxxx@localhost redis-stable]$ redis-server xxxx.conf
then run
[xxxxx@localhost redis-stable]$ redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 --cluster-replicas 1
output of above should be like:
>>> Performing hash slots allocation on 6 nodes...
2nd way to set up all things automatically: you can use utils/create-cluster scripts to set up every thing for you like starting all nodes, creating cluster you an follow https://redis.io/topics/cluster-tutorial
Thanks