Redis Slave - 在复制握手中向主服务器发送命令 : -Writing to master: Unknown error

标签 redis redis-sentinel

我对设置 redis sentinel 有点陌生,但关注了几篇关于它的在线帖子,它看起来相当简单。当我启动它们时,我的任何奴隶都收到以下错误。以下是每台机器上的错误和配置。它们都在运行 Windows Server 2012 R2 Standard,我安装了 Redis 3.2.100 x64。

Node1 - redis.conf

bind 127.0.0.1
port 6381

dir .

节点2-redis.conf

bind 127.0.0.1
port 6381

dir .

slaveof 192.168.20.130 6380

启动 node2 时收到的日志输出 (redis-server.exe node2\redis.conf)

26 Oct 18:27:33.889 # Server started, Redis version 3.2.100
[1248] 26 Oct 18:27:33.889 * The server is now ready to accept connections on port 6380
[1248] 26 Oct 18:27:33.905 - 0 clients connected (0 slaves), 631464 bytes in use
[1248] 26 Oct 18:27:33.905 * Connecting to MASTER 192.168.20.130:6380
[1248] 26 Oct 18:27:33.905 * MASTER <-> SLAVE sync started
[1248] 26 Oct 18:27:34.922 * Non blocking connect for SYNC fired the event.
[1248] 26 Oct 18:27:34.922 # Sending command to master in replication handshake: -Writing to master: Unknown error

node1 和 node2 上的防火墙都关闭了,我可以在它们之间成功 ping 通。我测试了在同一台服务器上运行 node1 和 node2 配置并且工作正常所以它似乎是机器对机器。似乎找不到与此错误消息相关的任何内容。

有什么想法吗?

最佳答案

经过反复试验并找到一些随机论坛后发现您需要绑定(bind)到您的本地 IP 地址(而不是 127.0.0.1)。

关于Redis Slave - 在复制握手中向主服务器发送命令 : -Writing to master: Unknown error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40274767/

相关文章:

python - 在运行时定义 Redis 数据库

ruby - Redis:如何在 ruby​​ 客户端中以编程方式加载 dump.rdb

redis - 我们可以配置 Redis 服务器来接受来自不同机器的 LogShippers 吗?

java - 无法从运行@myIpaddress :6379 的哨兵获取主地址

具有 2 个应用程序服务器和 1 个附加 Sentinel 节点设置的 Redis Sentinel

redis - Redis v3.2.x 是否向后兼容 v2.8.x?

redis - 获取redis master哨兵

redis - 使用 ServiceStack.Redis 客户端版本 4.0.44 从远程服务器访问 redis 时获取 "No Redis Sentinels were available"

redis - 如何将 Redis sentinel 添加到我已经存在的主从 Redis 中?

redis - 无法运行传递给 Redis 的 Lua 脚本 : This Redis command is not allowed from scripts