I have 1 master and 2 slave redis servers. I configured sentinel.conf in all the 3 servers as same(sentinel port-26379).
When I start the Sentinel I got an error message saying the following:
16765:X 22 May 2019 12:19:53.215 # Configuration loaded
16766:X 22 May 2019 12:19:53.217 * Increased maximum number of open files to 10032 (it was originally set to 1024).
16766:X 22 May 2019 12:19:53.217 # Could not create server TCP listening socket slave-1-ip:26379: bind: Cannot assign requested address
16766:X 22 May 2019 12:19:53.217 # Could not create server TCP listening socket slave-2-ip:26379: bind: Cannot assign requested address
16766:X 22 May 2019 12:19:53.218 * Running mode=sentinel, port=26379.
16766:X 22 May 2019 12:19:53.218 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
16766:X 22 May 2019 12:19:53.218 # Sentinel ID is f3738395bf4099ca3faebc7ea7caaa45e93b40a3
16766:X 22 May 2019 12:19:53.218 # +monitor master redis-01 masterip 6379 quorum 2
16766:X 22 May 2019 12:21:23.219 # +sdown master redis-01 masterip 6379
16766:X 22 May 2019 12:58:00.013 # +sdown slave slave-1-ip:6379 slave-1-ip 6379 @ redis-01 masterip 6379
My sentinel.conf file:
protected-mode no
port 26379
daemonize yes
sentinel monitor redis-01 master-ip 6379 2
# sentinel announce-ip 1.2.3.4
sentinel down-after-milliseconds redis-01 90000
sentinel failover-timeout redis-01 90000
sentinel parallel-syncs redis-01 2
# Generated by CONFIG REWRITE
protected-mode no
sentinel auth-pass redis-01 password
sentinel config-epoch redis-01 0
sentinel leader-epoch redis-01 0
sentinel known-replica redis-01 slave-1-ip 6379
sentinel known-replica redis-01 slave-2-ip 6379
sentinel current-epoch 0
What am I missing?
What should I change to make sentinel working perfect?
UPDATE:
I changed the sentinel ports to a different port on all hosts(26379, 26380, 26381 for host1, host2 and host3 respectively, previously it's same on all 26379).
It's working perfectly fine now;
But why can't I run sentinel on the same port on all the hosts? while I can run redis server same on all hosts(6379)?