43910:S 06 Oct 23:45:51.903 * MASTER <-> SLAVE sync started 43910:S 06 Oct 23:45:51.904 # Error condition on socket for SYNC: Connection refused 43910:S 06 Oct 23:45:52.914 * Connecting to MASTER 127.0.0.1:6379
... 43910:S 06 Oct 23:46:21.205 * MASTER <-> SLAVE sync started 43910:S 06 Oct 23:46:21.206 # Error condition on socket for SYNC: Connection refused 43910:M 06 Oct 23:46:21.960 # Setting secondary replication ID to 7a2c11e996810f76bdc72765130dcf47b5af4ab8, valid up to offset: 111989. New replication ID is a6939796e0faba3555a74719ec18498e7b247756 43910:M 06 Oct 23:46:21.960 * Discarding previously cached master state. 43910:M 06 Oct 23:46:21.962 * MASTER MODE enabled (user request from 'id=13 addr=127.0.0.1:51348 fd=12 name=sentinel-7c387d9b-cmd age=568 idle=0 flags=x db=0 sub=0 psub=0 multi=3 qbuf=0 qbuf-free=32768 obl=36 oll=0 omem=0 events=r cmd=exec') 43910:M 06 Oct 23:46:21.963 # CONFIG REWRITE executed with success. 43910:M 06 Oct 23:46:23.354 * Slave 127.0.0.1:6381 asks for synchronization 43910:M 06 Oct 23:46:23.354 * Partial resynchronization request from 127.0.0.1:6381 accepted. Sending 422 bytes of backlog starting from offset 111989. 43910:M 06 Oct 23:49:59.772 * Slave 127.0.0.1:6379 asks for synchronization 43910:M 06 Oct 23:49:59.772 * Partial resynchronization not accepted: Replication ID mismatch (Slave asked for '4a931cc983685e6f1b029225185120eee25f03b4', my replication IDs are 'a6939796e0faba3555a74719ec18498e7b247756' and '7a2c11e996810f76bdc72765130dcf47b5af4ab8') 43910:M 06 Oct 23:49:59.773 * Starting BGSAVE for SYNC with target: disk 43910:M 06 Oct 23:49:59.773 * Background saving started by pid 44404 44404:C 06 Oct 23:49:59.775 * DB saved on disk 43910:M 06 Oct 23:49:59.855 * Background saving terminated with success 43910:M 06 Oct 23:49:59.856 * Synchronization with slave 127.0.0.1:6379 succeeded
- 然后看一下6381的:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
... 44117:S 06 Oct 23:46:22.338 * Connecting to MASTER 127.0.0.1:6379 44117:S 06 Oct 23:46:22.339 * MASTER <-> SLAVE sync started 44117:S 06 Oct 23:46:22.340 # Error condition on socket for SYNC: Connection refused 44117:S 06 Oct 23:46:22.866 * SLAVE OF 127.0.0.1:6380 enabled (user request from 'id=11 addr=127.0.0.1:51346 fd=12 name=sentinel-7c387d9b-cmd age=569 idle=0 flags=x db=0 sub=0 psub=0 multi=3 qbuf=133 qbuf-free=32635 obl=36 oll=0 omem=0 events=r cmd=exec') 44117:S 06 Oct 23:46:22.867 # CONFIG REWRITE executed with success. 44117:S 06 Oct 23:46:23.351 * Connecting to MASTER 127.0.0.1:6380 44117:S 06 Oct 23:46:23.351 * MASTER <-> SLAVE sync started 44117:S 06 Oct 23:46:23.352 * Non blocking connect for SYNC fired the event. 44117:S 06 Oct 23:46:23.353 * Master replied to PING, replication can continue... 44117:S 06 Oct 23:46:23.353 * Trying a partial resynchronization (request 7a2c11e996810f76bdc72765130dcf47b5af4ab8:111989). 44117:S 06 Oct 23:46:23.354 * Successful partial resynchronization with master. 44117:S 06 Oct 23:46:23.355 # Master replication ID changed to a6939796e0faba3555a74719ec18498e7b247756 44117:S 06 Oct 23:46:23.355 * MASTER <-> SLAVE sync: Master accepted a Partial Resynchronization.
42485:M 06 Oct 23:45:51.599 # User requested shutdown... 42485:M 06 Oct 23:45:51.600 * Saving the final RDB snapshot before exiting. 42485:M 06 Oct 23:45:51.601 * DB saved on disk 42485:M 06 Oct 23:45:51.601 * Removing the pid file. 42485:M 06 Oct 23:45:51.602 # Redis is now ready to exit, bye bye... 44398:C 06 Oct 23:49:48.652 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 44398:C 06 Oct 23:49:48.653 # Redis version=4.0.11, bits=64, commit=00000000, modified=0, pid=44398, just started 44398:C 06 Oct 23:49:48.654 # Configuration loaded 44399:M 06 Oct 23:49:48.656 * Increased maximum number of open files to 10032 (it was originally set to 4864). 44399:M 06 Oct 23:49:48.657 * Running mode=standalone, port=6379. 44399:M 06 Oct 23:49:48.657 # Server initialized 44399:M 06 Oct 23:49:48.657 * DB loaded from disk: 0.000 seconds 44399:M 06 Oct 23:49:48.658 * Ready to accept connections 44399:S 06 Oct 23:49:58.958 * Before turning into a slave, using my master parameters to synthesize a cached master: I may be able to synchronize with the new master with just a partial transfer. 44399:S 06 Oct 23:49:58.958 * SLAVE OF 127.0.0.1:6380 enabled (user request from 'id=3 addr=127.0.0.1:52967 fd=7 name=sentinel-ba913a9c-cmd age=10 idle=0 flags=x db=0 sub=0 psub=0 multi=3 qbuf=0 qbuf-free=32768 obl=36 oll=0 omem=0 events=r cmd=exec') 44399:S 06 Oct 23:49:58.960 # CONFIG REWRITE executed with success. 44399:S 06 Oct 23:49:59.769 * Connecting to MASTER 127.0.0.1:6380 44399:S 06 Oct 23:49:59.769 * MASTER <-> SLAVE sync started 44399:S 06 Oct 23:49:59.770 * Non blocking connect for SYNC fired the event. 44399:S 06 Oct 23:49:59.771 * Master replied to PING, replication can continue... 44399:S 06 Oct 23:49:59.771 * Trying a partial resynchronization (request 4a931cc983685e6f1b029225185120eee25f03b4:1). 44399:S 06 Oct 23:49:59.774 * Full resync from master: a6939796e0faba3555a74719ec18498e7b247756:155145 44399:S 06 Oct 23:49:59.774 * Discarding previously cached master state. 44399:S 06 Oct 23:49:59.856 * MASTER <-> SLAVE sync: receiving 202 bytes from master 44399:S 06 Oct 23:49:59.857 * MASTER <-> SLAVE sync: Flushing old data 44399:S 06 Oct 23:49:59.857 * MASTER <-> SLAVE sync: Loading DB in memory 44399:S 06 Oct 23:49:59.858 * MASTER <-> SLAVE sync: Finished with success