redis運維問題集錦FAQ

一、修改配置文件參數,「persistence-available no」 主從複製失敗。redis

    緣由是該方式關閉了用於主從同步功能的快照方式。在配置文件文件有這樣一段話:「這個配置通常不會和RDB或者AOF的持久化相關的配置一塊兒使用」,所以這個配置使用在單節點做爲LRU緩存服務時使用。緩存

[4744] 11 Jul 13:15:47.234 * Connecting to MASTER 127.0.0.1:6379
[4744] 11 Jul 13:15:47.874 * MASTER <-> SLAVE sync started
[4744] 11 Jul 13:15:47.889 * Non blocking connect for SYNC fired the event.
[4744] 11 Jul 13:15:47.889 * Master replied to PING, replication can continue...

[4744] 11 Jul 13:15:47.889 * (Non critical) Master does not understand REPLCONF listening-port: -ERR unknown command 'REPLCONF'
[4744] 11 Jul 13:15:47.889 * (Non critical) Master does not understand REPLCONF capa: -ERR unknown command 'REPLCONF'
[4744] 11 Jul 13:15:47.889 * Partial resynchronization not possible (no cached master)
[4744] 11 Jul 13:15:47.889 * Master does not support PSYNC or is in error state (reply: -ERR unknown command 'PSYNC')
[4744] 11 Jul 13:15:47.889 * Retrying with SYNC...
[4744] 11 Jul 13:15:47.889 # MASTER aborted replication with an error: ERR unknown command 'SYNC'

二、持久化命令,BGSAVE、BGREWRITEAOF分別是在後臺保存RDB和AOF文件用於手動觸發生成持久化文件。bash

三、redis經常使用作爲後臺守護進程時,設置「daemonize yes」,設置後會生成相似/var/run/redis.pid文件,可進行查看。code

相關文章
相關標籤/搜索