0

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)?

AATHITH RAJENDRAN
  • 4,689
  • 8
  • 34
  • 58
  • Which version of redis you are on? Could be this known bug: https://github.com/antirez/redis/issues/5055 – rainhacker May 23 '19 at 16:08
  • I changed the sentinel ports to 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)? @rainhacker – AATHITH RAJENDRAN May 24 '19 at 03:53
  • Did you verify if the port 26379 wasn't in use by some other processes? Also, I'd remove the line with `sentinel auth-pass` in your question :) – rainhacker May 25 '19 at 23:15
  • the only process running in my port 26379 is sentinel(on all three hosts) @rainhacker – AATHITH RAJENDRAN May 27 '19 at 03:58

0 Answers0