@Author:hanguixian
@Email:[email protected]
pidfile /var/run/redis_6380.pid
port 6380
logfile "6380.log"
dbfilename dump6380.rdb
appendfilename "appendonly6380.aof"
##端口:6379##
[root@xxxmmm bin]# redis-server /hanguixian/myredis/redis_6379.conf
[root@xxxmmm bin]# redis-cli -p 6379
127.0.0.1:6379> info replication
# Replication
##############启动起来是master################################
role:master
connected_slaves:0
master_replid:d33a8a6e37b2f0ca28ab7557c12acc8bf1d58751
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
127.0.0.1:6379> KEYS *
(empty list or set)
127.0.0.1:6379> set k1 v1
OK
127.0.0.1:6379> set k2 v2
OK
127.0.0.1:6379> info replication
# Replication
role:master
###################配置了两个从库#######################################
connected_slaves:2
slave0:ip=127.0.0.1,port=6380,state=online,offset=70,lag=0
slave1:ip=127.0.0.1,port=6381,state=online,offset=70,lag=1
master_replid:458473b6141ebd0012dd6698913afe6be6b75c7d
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:70
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:70
127.0.0.1:6379> set k3 v3
OK
127.0.0.1:6379> SHUTDOWN
not connected> exit
[root@xxxmmm bin]# redis-server /hanguixian/myredis/redis_6379.conf
[root@xxxmmm bin]# redis-cli -p 6379
127.0.0.1:6379> keys *
1) "k1"
2) "k3"
3) "k2"
127.0.0.1:6379> set k4 v4
OK
127.0.0.1:6379> info replication
# Replication
role:master
connected_slaves:1
slave0:ip=127.0.0.1,port=6381,state=online,offset=192,lag=1
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:192
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:192
###############################################################################
###端口:6380###
[root@xxxmmm bin]# redis-server /hanguixian/myredis/redis_6380.conf
[root@xxxmmm bin]# redis-cli -p 6380
127.0.0.1:6380> info replication
# Replication
role:master
###############启动起来都是master###############################
connected_slaves:0
master_replid:b25d2d448e71cce4aba5168560f874715be8e67c
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
127.0.0.1:6380> keys *
(empty list or set)
####################从库配置######################################
127.0.0.1:6380> SLAVEOF 127.0.0.1 6379
OK
127.0.0.1:6380> info replication
# Replication
####################从库配置后变成了slave##########################
role:slave
master_host:127.0.0.1
master_port:6379
#########################连接状态up#################################
master_link_status:up
master_last_io_seconds_ago:2
master_sync_in_progress:0
slave_repl_offset:14
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:458473b6141ebd0012dd6698913afe6be6b75c7d
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:14
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:14
127.0.0.1:6380> keys *
1) "k1"
2) "k2"
127.0.0.1:6380> keys *
1) "k3"
2) "k1"
3) "k2"
#####################从库默认不可写#####################################
127.0.0.1:6380> set k666 v666
(error) READONLY You can't write against a read only replica.
127.0.0.1:6380> info replication
# Replication
###################主库挂了后,salve没有变成master#######################
role:slave
master_host:127.0.0.1
master_port:6379
#######################主库挂了后,连接断开################################
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_repl_offset:276
master_link_down_since_seconds:9
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:458473b6141ebd0012dd6698913afe6be6b75c7d
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:276
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:276
127.0.0.1:6380> keys *
1) "k3"
2) "k1"
3) "k2"
127.0.0.1:6380> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
##################主库重新启动后,连接状态up########################################
master_link_status:up
master_last_io_seconds_ago:7
master_sync_in_progress:0
slave_repl_offset:14
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:14
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:14
127.0.0.1:6380> keys *
1) "k3"
2) "k4"
3) "k1"
4) "k2"
127.0.0.1:6380> SHUTDOWN
not connected> exit
[root@xxxmmm bin]# redis-server /hanguixian/myredis/redis_6380.conf
[root@xxxmmm bin]# redis-cli -p 6380
127.0.0.1:6380> keys *
1) "k4"
2) "k2"
3) "k1"
4) "k3"
127.0.0.1:6380> info replication
# Replication
##################从库断开重连后,变成了master########################
role:master
connected_slaves:0
master_replid:97e8893dcd75b4a4a0af650dd09a13a37b8f6923
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
########################需要重新配置##################################
127.0.0.1:6380> SLAVEOF 127.0.0.1 6379
OK
127.0.0.1:6380> keys *
1) "k2"
2) "k1"
3) "k4"
4) "k3"
##########################################################################
###端口:6381###
[root@xxxmmm bin]# redis-server /hanguixian/myredis/redis_6381.conf
[root@xxxmmm bin]# redis-cli -p 6381
127.0.0.1:6381> KEYS *
(empty list or set)
127.0.0.1:6381> info repalication
127.0.0.1:6381> info replication
# Replication
role:master
connected_slaves:0
master_replid:d1d3fc86699f0947975c1d7986c95e0d3a846602
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
127.0.0.1:6381> SLAVEOF 127.0.0.1 6379
OK
127.0.0.1:6381> keys *
1) "k1"
2) "k2"
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
master_link_status:down
master_last_io_seconds_ago:-1
master_sync_in_progress:0
slave_repl_offset:276
master_link_down_since_seconds:20
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:458473b6141ebd0012dd6698913afe6be6b75c7d
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:276
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:57
repl_backlog_histlen:220
127.0.0.1:6381> keys *
1) "k1"
2) "k4"
3) "k2"
##########################################################################
###端口查看###
[root@xxxmmm bin]# ps -ef|grep redis
root 17162 1 0 21:59 ? 00:00:00 redis-server 127.0.0.1:6379
root 17171 17116 0 22:00 pts/0 00:00:00 redis-cli -p 6379
root 17248 1 0 22:07 ? 00:00:00 redis-server 127.0.0.1:6380
root 17252 17174 0 22:07 pts/1 00:00:00 redis-cli -p 6380
root 17254 1 0 22:07 ? 00:00:00 redis-server 127.0.0.1:6381
root 17258 17222 0 22:08 pts/2 00:00:00 redis-cli -p 6381
root 17290 17261 0 22:10 pts/3 00:00:00 grep --color=auto redis
###################端口:6379##########################
[root@xxxmmm bin]# redis-cli -p 6379
127.0.0.1:6379> info replication
# Replication
role:master
connected_slaves:2
slave0:ip=127.0.0.1,port=6381,state=online,offset=119626,lag=0
slave1:ip=127.0.0.1,port=6380,state=online,offset=119626,lag=1
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:119626
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:119626
127.0.0.1:6379> set kuu vuu
OK
127.0.0.1:6379> info replication
# Replication
role:master
connected_slaves:1
slave0:ip=127.0.0.1,port=6380,state=online,offset=120030,lag=1
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:120030
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:120030
###################端口:6380##########################
[root@xxxmmm bin]# redis-cli -p 6380
127.0.0.1:6380> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
master_link_status:up
master_last_io_seconds_ago:1
master_sync_in_progress:0
slave_repl_offset:119710
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:119710
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:221
repl_backlog_histlen:119490
127.0.0.1:6380> keys *
1) "k2"
2) "k1"
3) "k4"
4) "k3"
127.0.0.1:6380> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
master_link_status:up
master_last_io_seconds_ago:6
master_sync_in_progress:0
slave_repl_offset:119850
slave_priority:100
slave_read_only:1
connected_slaves:1
slave0:ip=127.0.0.1,port=6381,state=online,offset=119850,lag=1
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:119850
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:221
repl_backlog_histlen:119630
127.0.0.1:6380> keys *
1) "k2"
2) "k1"
3) "k4"
4) "k3"
127.0.0.1:6380> set km vm11
(error) READONLY You can't write against a read only replica.
127.0.0.1:6380> keys *
1) "k4"
2) "k1"
3) "k2"
4) "kuu"
5) "k3"
###################端口:6381##########################
[root@xxxmmm bin]# redis-cli -p 6381
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
master_link_status:up
master_last_io_seconds_ago:3
master_sync_in_progress:0
slave_repl_offset:119780
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:119780
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:119780
127.0.0.1:6381> keys *
1) "k1"
2) "k4"
3) "k2"
4) "k3"
127.0.0.1:6381> SLAVEOF 127.0.0.1 6380
OK
127.0.0.1:6381> keys *
1) "k1"
2) "k4"
3) "k2"
4) "k3"
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6380
master_link_status:up
master_last_io_seconds_ago:8
master_sync_in_progress:0
slave_repl_offset:119836
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:119836
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:119836
127.0.0.1:6381> keys *
1) "k3"
2) "k2"
3) "k4"
4) "k1"
5) "kuu"
#################端口:6379########################################
127.0.0.1:6379> info replication
# Replication
role:master
connected_slaves:1
slave0:ip=127.0.0.1,port=6380,state=online,offset=120030,lag=1
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:120030
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:120030
127.0.0.1:6379> info replication
# Replication
role:master
connected_slaves:0
master_replid:568ced83b66508a1bd5ab472ea60a81242f3141e
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:120744
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:120744
#################端口:6380########################################
127.0.0.1:6380> SLAVEOF no one
OK
127.0.0.1:6380> info replication
# Replication
role:master
connected_slaves:1
slave0:ip=127.0.0.1,port=6381,state=online,offset=120786,lag=1
master_replid:d411a5594443b42429ae25d38c3269e28c743d27
master_replid2:568ced83b66508a1bd5ab472ea60a81242f3141e
master_repl_offset:120786
second_repl_offset:120745
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:221
repl_backlog_histlen:120566
127.0.0.1:6380> keys *
1) "k4"
2) "k1"
3) "k2"
4) "kuu"
5) "k3"
###############端口:6381########################################
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6380
master_link_status:up
master_last_io_seconds_ago:2
master_sync_in_progress:0
slave_repl_offset:120842
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:d411a5594443b42429ae25d38c3269e28c743d27
master_replid2:568ced83b66508a1bd5ab472ea60a81242f3141e
master_repl_offset:120842
second_repl_offset:120745
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:120842
####端口:6379###
[root@xxxmmm bin]# redis-cli -p 6379
127.0.0.1:6379> info replication
# Replication
role:master
connected_slaves:2
slave0:ip=127.0.0.1,port=6381,state=online,offset=120814,lag=0
slave1:ip=127.0.0.1,port=6380,state=online,offset=120814,lag=1
master_replid:75a7031ef8688d571732a359971c32ccbe8cccbe
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:120814
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:120745
repl_backlog_histlen:70
127.0.0.1:6379> SHUTDOWN
not connected> exit
[root@xxxmmm bin]# ps -ef|grep redis
root 17254 1 0 Dec10 ? 00:02:18 redis-server 127.0.0.1:6381
root 17338 1 0 Dec10 ? 00:02:16 redis-server 127.0.0.1:6380
root 20022 20004 0 22:39 pts/1 00:00:00 redis-cli -p 6380
root 20042 20025 0 22:39 pts/2 00:00:00 redis-cli -p 6381
root 20075 20054 0 22:44 pts/3 00:00:00 redis-sentinel *:26379 [sentinel]
root 20082 19980 0 22:46 pts/0 00:00:00 grep --color=auto redis
[root@xxxmmm bin]# redis-server /hanguixian/myredis/redis_63
redis_6379.conf redis_6380.conf redis_6381.conf
[root@xxxmmm bin]# redis-server /hanguixian/myredis/redis_6379.conf
[root@xxxmmm bin]# redis-cli -p 6379
127.0.0.1:6379> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6381
master_link_status:up
master_last_io_seconds_ago:1
master_sync_in_progress:0
slave_repl_offset:191974
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:989c58ab7281d1858cb244f0e12ea18f50c8e3cd
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:191974
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:189945
repl_backlog_histlen:2030
###############端口:6380#####################
127.0.0.1:6380> SLAVEOF 127.0.0.1 6379
OK
127.0.0.1:6380> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
master_link_status:up
master_last_io_seconds_ago:1
master_sync_in_progress:0
slave_repl_offset:120800
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:75a7031ef8688d571732a359971c32ccbe8cccbe
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:120800
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:120801
repl_backlog_histlen:0
127.0.0.1:6380> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6381
master_link_status:up
master_last_io_seconds_ago:0
master_sync_in_progress:0
slave_repl_offset:126927
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:989c58ab7281d1858cb244f0e12ea18f50c8e3cd
master_replid2:75a7031ef8688d571732a359971c32ccbe8cccbe
master_repl_offset:126927
second_repl_offset:123836
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:120801
repl_backlog_histlen:6127
######################端口:6381######################################
127.0.0.1:6381> SLAVEOF 127.0.0.1 6379
OK
127.0.0.1:6381> info replication
# Replication
role:slave
master_host:127.0.0.1
master_port:6379
master_link_status:up
master_last_io_seconds_ago:0
master_sync_in_progress:0
slave_repl_offset:120758
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:75a7031ef8688d571732a359971c32ccbe8cccbe
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:120758
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:120745
repl_backlog_histlen:14
127.0.0.1:6381> KEYS *
1) "k2"
2) "k3"
3) "k4"
4) "k1"
5) "kuu"
127.0.0.1:6381> info replication
# Replication
role:master
connected_slaves:1
slave0:ip=127.0.0.1,port=6380,state=online,offset=127320,lag=1
master_replid:989c58ab7281d1858cb244f0e12ea18f50c8e3cd
master_replid2:75a7031ef8688d571732a359971c32ccbe8cccbe
master_repl_offset:127320
second_repl_offset:123836
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:120745
repl_backlog_histlen:6576
###############编写:sentinel.conf####################################
sentinel monitor my6379 127.0.0.1 6379 1
##################运行###############################################
[root@xxxmmm bin]# redis-sentinel /hanguixian/myredis/sentinel.conf
20075:X 12 Dec 2018 22:44:52.701 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
20075:X 12 Dec 2018 22:44:52.701 # Redis version=5.0.0, bits=64, commit=00000000, modified=0, pid=20075, just started
20075:X 12 Dec 2018 22:44:52.701 # Configuration loaded
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 5.0.0 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in sentinel mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 26379
| `-._ `._ / _.-' | PID: 20075
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
20075:X 12 Dec 2018 22:44:52.703 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
20075:X 12 Dec 2018 22:44:52.728 # Sentinel ID is 26709d9a12e01632f557b0310533f3fc8806e57c
20075:X 12 Dec 2018 22:44:52.728 # +monitor master my6379 127.0.0.1 6379 quorum 1
20075:X 12 Dec 2018 22:44:52.729 * +slave slave 127.0.0.1:6381 127.0.0.1 6381 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:44:52.748 * +slave slave 127.0.0.1:6380 127.0.0.1 6380 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:04.764 # +sdown master my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:04.764 # +odown master my6379 127.0.0.1 6379 #quorum 1/1
20075:X 12 Dec 2018 22:46:04.764 # +new-epoch 1
20075:X 12 Dec 2018 22:46:04.764 # +try-failover master my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:04.793 # +vote-for-leader 26709d9a12e01632f557b0310533f3fc8806e57c 1
20075:X 12 Dec 2018 22:46:04.793 # +elected-leader master my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:04.793 # +failover-state-select-slave master my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:04.855 # +selected-slave slave 127.0.0.1:6381 127.0.0.1 6381 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:04.855 * +failover-state-send-slaveof-noone slave 127.0.0.1:6381 127.0.0.1 6381 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:04.917 * +failover-state-wait-promotion slave 127.0.0.1:6381 127.0.0.1 6381 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:05.915 # +promoted-slave slave 127.0.0.1:6381 127.0.0.1 6381 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:05.915 # +failover-state-reconf-slaves master my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:05.970 * +slave-reconf-sent slave 127.0.0.1:6380 127.0.0.1 6380 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:06.909 * +slave-reconf-inprog slave 127.0.0.1:6380 127.0.0.1 6380 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:06.909 * +slave-reconf-done slave 127.0.0.1:6380 127.0.0.1 6380 @ my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:06.974 # +failover-end master my6379 127.0.0.1 6379
20075:X 12 Dec 2018 22:46:06.974 # +switch-master my6379 127.0.0.1 6379 127.0.0.1 6381
20075:X 12 Dec 2018 22:46:06.974 * +slave slave 127.0.0.1:6380 127.0.0.1 6380 @ my6379 127.0.0.1 6381
20075:X 12 Dec 2018 22:46:06.974 * +slave slave 127.0.0.1:6379 127.0.0.1 6379 @ my6379 127.0.0.1 6381
20075:X 12 Dec 2018 22:46:36.998 # +sdown slave 127.0.0.1:6379 127.0.0.1 6379 @ my6379 127.0.0.1 6381
20075:X 12 Dec 2018 23:02:41.759 # -sdown slave 127.0.0.1:6379 127.0.0.1 6379 @ my6379 127.0.0.1 6381
20075:X 12 Dec 2018 23:02:51.689 * +convert-to-slave slave 127.0.0.1:6379 127.0.0.1 6379 @ my6379 127.0.0.1 6381
###########################再次查看sentinel.conf##########################################
sentinel myid 26709d9a12e01632f557b0310533f3fc8806e57c
# Generated by CONFIG REWRITE
port 26379
dir "/usr/local/bin"
sentinel deny-scripts-reconfig yes
sentinel monitor my6379 127.0.0.1 6381 1
sentinel config-epoch my6379 1
sentinel leader-epoch my6379 1
sentinel known-replica my6379 127.0.0.1 6379
sentinel known-replica my6379 127.0.0.1 6380
sentinel current-epoch 1