Hello,
I am trying to setup redis sentinal, with one master and two slaves.
All redis instances are separated on separate VMs, listening on port 6379 and following IPs
192.168.10.4 Master
192.168.10.3 Slave1
192.168.10.2 Slave2
The configuration file I used for sentinal is
port 26379
sentinel monitor redismaster 192.168.10.4 6379 1
sentinel down-after-milliseconds redismaster 5000
sentinel failover-timeout redismaster 900000
logfile "/var/log/redis/sentinel.log"
As soon as I start sentinal on master as expected its discovering the slaves and auto modifying the config file.
But when I start sentinal on one slave ( separate VMs )
I can see a line like this is getting added to the config file
sentinel known-sentinel redismaster 192.168.10.1 26379 fb34o98nanXXXXXX
Also similarly in the slave sentinal config file, but each having a different IP in that line like
sentinel known-sentinel redismaster 192.168.10.2 26379 fb34o98nanXXXXXX
Those are actually virtual IPs present on those VMS, but assigned and listening to other services.
In the sentinal log file it shows like
59050:X 01 Dec 17:27:47.499 * +sentinel-address-switch master redismaster 192.168.10.4 6379 ip 192.168.10.3 port 26379 for XXXXXXX
59050:X 01 Dec 17:27:47.502 * +sentinel-address-switch master redismaster 192.168.10.4 6379 ip 192.168.10.1 port 26379 for XXXXXXXXXXx
Is this expected ? I mean I didn't expect, sentinal to pick random IPs present on the VMs. Any help would be greatly appreciated.
PS: I have masked the IDs and replaced original ip addresses
Thanks,
Raju.