在本地虚拟机上,配置redis主从
虚拟机防火墙已经关闭,service iptables stop
两个端口的配置文件 redis.conf 与 redis6380.conf
redis6380中 slaveof localhost 6379
主服务器关闭redis protected-mode
配置后启动, 在主服务器上 info Replication 没有连接的从服务器
请问这回是什么原因呢?
redis的版本是3.2.4
日志显示
1946:S 01 Oct 10:44:18.583 * Connecting to MASTER localhost:6379
1946:S 01 Oct 10:44:18.584 * MASTER <-> SLAVE sync started
1946:S 01 Oct 10:44:18.584 # Error condition on socket for SYNC: Connection refused
1946:S 01 Oct 10:44:19.603 * Connecting to MASTER localhost:6379
1946:S 01 Oct 10:44:19.604 * MASTER <-> SLAVE sync started
1946:S 01 Oct 10:44:19.604 # Error condition on socket for SYNC: Connection refused
可能是端口没打开。