By sidhartha11
I bring up a master. I then bring up a sentinel. All is fine. The sentinel is aware of the master. I then bring up a slave. The slave gets a connection refused error when trying to connect to the master. Master <-> sync started message being repeated over and over in the log files. NO authentication is being used in this example. Config files are extremely simple , bare minimun. I follow the example in this link to the TEE:
https://seanmcgary.com/posts/how-to-build-a-fault-tolerant-redis-cluster-with-sentinel
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
In case anyone stumbles upon this question
To configure Redis4 on 3 machines with 2 slaves, 1 master, and 3 sentinels, you can follow the steps below:
Install Redis4 on all 3 machines. You can do this by following the installation instructions for your specific operating system.
Choose one of the machines to be the master node. To do this, edit the redis.conf file on the master machine and uncomment the following lines:
bind 0.0.0.0
port 6379
daemonize yes
You can also set a password for your Redis instance by uncommenting the following line and setting a password:
requirepass yourpassword
Save the changes and restart Redis on the master machine.
bind 0.0.0.0
port 6379
daemonize yes
slaveof master_ip_address 6379
Replace master_ip_address with the IP address of the master machine. Save the changes and restart Redis on each slave machine.
bind 0.0.0.0
port 26379
daemonize yes
sentinel monitor mymaster master_ip_address 6379 2
sentinel auth-pass mymaster yourpassword
Replace `master_ip_address` with the IP address of the master machine. If you set a password for your Redis instance, uncomment the second line and replace `yourpassword` with your password. Save the changes and restart Redis on the sentinel machine.
Copy the sentinel.conf file to the other two machines and edit it to change the bind and port values to different values. For example, you could set port to 26380 on the second sentinel machine and 26381 on the third sentinel machine.
Start the sentinels on all three machines by running the following command on each machine:
redis-server /path/to/sentinel.conf --sentinel
This will start the Redis server in sentinel mode and load the sentinel configuration file.
Verify that the Redis master and slave nodes are working correctly by connecting to them with the Redis CLI and running commands such as INFO, SET, and GET. You can also use the INFO replication command to check the replication status of the slave nodes.
Verify that the Redis sentinels are working correctly by connecting to them with the Redis CLI and running commands such as SENTINEL masters and SENTINEL slaves mymaster. These commands will show you information about the master and slave nodes monitored by the sentinels.
By following these steps, you should have a working Redis4 setup with 2 slave nodes, 1 master node, and 3 sentinel nodes.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.