Redis主從複製失敗(master_link_status:down)

今天配置redis主從複製時出現master_link_status:down提示。redis

首先打開slave的redis.conf配置文件,肯定slaveof 和masterauth 兩個選項配置是否正確。spa

而後再把後臺進程的選項關閉:daemonize no(應該大多數同窗爲了方便把它設爲yes了)進程

slave再啓動時出現以下提示:ip

 

[10144] 14 May 01:04:22 * Connecting to MASTER...
[10144] 14 May 01:04:22 * MASTER <-> SLAVE sync started
[10144] 14 May 01:04:22 * Non blocking connect for SYNC fired the event.
[10144] 14 May 01:04:22 # Unable to AUTH to MASTER: Writing to master: No route to hostit

說slave鏈接不上master,那就多是防火牆的緣由了。因而用下面命令分別把master和slave防火牆關掉以後重啓,搞定!event

service iptables stoptable

相關文章
相關標籤/搜索