Notification Script not triggered on Failover

37 views
Skip to first unread message

Dominic Hopf

unread,
Apr 8, 2015, 4:44:28 AM4/8/15
to redi...@googlegroups.com
Greetings, 

I have a setup of two Redis-Servers and two Sentinels watching over the Redis Servers. The Sentinel configuration basically is the following:

127.0.0.1:26379> sentinel masters
1)  1) "name"
    2) "mymaster"
    3) "ip"
    4) "172.16.12.96"
    5) "port"
    6) "6379"
    7) "runid"
    8) "4ff31341e69e9bc05cd993b393eea7809aa6f3ee"
    9) "flags"
   10) "master"
   11) "pending-commands"
   12) "0"
   13) "last-ping-sent"
   14) "0"
   15) "last-ok-ping-reply"
   16) "877"
   17) "last-ping-reply"
   18) "877"
   19) "down-after-milliseconds"
   20) "30000"
   21) "info-refresh"
   22) "8632"
   23) "role-reported"
   24) "master"
   25) "role-reported-time"
   26) "1123888"
   27) "config-epoch"
   28) "35"
   29) "num-slaves"
   30) "1"
   31) "num-other-sentinels"
   32) "1"
   33) "quorum"
   34) "2"
   35) "failover-timeout"
   36) "180000"
   37) "parallel-syncs"
   38) "1"
   39) "notification-script"
   40) "/usr/local/bin/redis-sentinel-notify"


So, when a failover takes place, I'd actually expect the defined notification-script to be triggered, but nothing like this happens according to the logs:

[3425] 08 Apr 10:19:46.843 # +sdown master mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:46.916 # +odown master mymaster 172.16.12.102 6379 #quorum 2/2
[3425] 08 Apr 10:19:46.916 # +new-epoch 35
[3425] 08 Apr 10:19:46.916 # +try-failover master mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:47.155 # +vote-for-leader 63f239c769985e600aed93b0e63e0f6d071cf43c 35
[3425] 08 Apr 10:19:47.209 # 172.16.12.96:26379 voted for 63f239c769985e600aed93b0e63e0f6d071cf43c 35
[3425] 08 Apr 10:19:47.279 # +elected-leader master mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:47.280 # +failover-state-select-slave master mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:47.346 # +selected-slave slave 172.16.12.96:6379 172.16.12.96 6379 @ mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:47.347 * +failover-state-send-slaveof-noone slave 172.16.12.96:6379 172.16.12.96 6379 @ mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:47.405 * +failover-state-wait-promotion slave 172.16.12.96:6379 172.16.12.96 6379 @ mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:48.269 # +promoted-slave slave 172.16.12.96:6379 172.16.12.96 6379 @ mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:48.269 # +failover-state-reconf-slaves master mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:48.291 # +failover-end master mymaster 172.16.12.102 6379
[3425] 08 Apr 10:19:48.291 # +switch-master mymaster 172.16.12.102 6379 172.16.12.96 6379
[3425] 08 Apr 10:19:48.291 * +slave slave 172.16.12.102:6379 172.16.12.102 6379 @ mymaster 172.16.12.96 6379

Are there any hints why this is not happening?

Thanks very much in advance & Best Regards,
Dominic

Anton Iutin

unread,
Apr 8, 2015, 8:45:41 AM4/8/15
to redi...@googlegroups.com
You need sentinel client-reconfig-script
Reply all
Reply to author
Forward
0 new messages