sentinel 日志
29114:X 12 Jun 14:04:20.607 # Sentinel runid is 043891c936a959aec45f8e66076f23a268fdb3e4
29114:X 12 Jun 14:04:20.607 # +monitor master mymaster 10.10.0.5 6379 quorum 2
29114:X 12 Jun 14:04:20.607 * +slave slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:04:20.608 * +slave slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:04:26.833 * +sentinel sentinel 10.10.0.6:26379 10.10.0.6 26379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:04:29.203 * +sentinel sentinel 10.10.0.7:26379 10.10.0.7 26379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:07:45.950 # +sdown slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:08:02.423 * +reboot slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:08:02.480 # -sdown slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.859 # +sdown master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.927 # +odown master mymaster 10.10.0.5 6379 #quorum 2/2
29114:X 12 Jun 14:22:42.927 # +new-epoch 1
29114:X 12 Jun 14:22:42.927 # +try-failover master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.928 # +vote-for-leader 043891c936a959aec45f8e66076f23a268fdb3e4 1
29114:X 12 Jun 14:22:42.930 # 10.10.0.6:26379 voted for 043891c936a959aec45f8e66076f23a268fdb3e4 1
29114:X 12 Jun 14:22:42.931 # 10.10.0.7:26379 voted for 043891c936a959aec45f8e66076f23a268fdb3e4 1
29114:X 12 Jun 14:22:42.999 # +elected-leader master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.999 # +failover-state-select-slave master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:43.100 # +selected-slave slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:43.100 * +failover-state-send-slaveof-noone slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:43.156 * +failover-state-wait-promotion slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:25:43.170 # -failover-abort-slave-timeout master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:25:43.232 # Next failover delay: I will not start a failover before Fri Jun 12 14:28:43 2015
# /usr/local/redis/bin/redis-cli -p 26379
127.0.0.1:26379> info
# Server
redis_version:3.0.2
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:505c8a5fd8dda26a
redis_mode:sentinel
os:Linux 2.6.32-431.11.7.el6.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.7
process_id:28648
run_id:d95639e7a3f0d7e640c8356da8665e59e2e9843e
tcp_port:26379
uptime_in_seconds:2034
uptime_in_days:0
hz:18
lru_clock:8027738
config_file:/usr/local/redis/sentinel.conf
# Sentinel
sentinel_masters:1
sentinel_tilt:0
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
master0:name=xkredis,status=odown,address=10.10.0.5:6379,slaves=2,sentinels=3
10.10.0.5:6379 master
10.10.0.6:6379
10.10.0.7:6379
10.10.0.5:26379
10.10.0.6:26379
10.10.0.7:26379
port 26379
daemonize yes
logfile "/usr/local/redis/log/sentinel.log"
sentinel monitor mymaster 10.10.0.5 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 180000
sentinel parallel-syncs mymaster 1
할 말도 없고 눈물만 흘렀습니다. . .
마스터-슬레이브 시작 후 문제 없이 테스트된 Redis 소스 코드에서 Redis를 컴파일하고 설치한 경우 내 rpm 패키지 패키징에 문제가 있을 수 있습니다.
아직은 연구가 더 필요한 것 같습니다.