redis-主从设置失败

标签 redis

我已经启动了端口为 6001 的服务器作为主服务器,关闭了持久性 aof,端口为 6002 的从服务器作为 6001 的主服务器。但是在启动从服务器时,我在无限循环中遇到以下错误还请注意能够找到任何错误日志一样..

Slave infinite loop logs : 

[5556] 20 Aug 21:34:28.499 # Server started, Redis version 3.2.100
[5556] 20 Aug 21:34:28.500 * DB loaded from disk: 0.001 seconds
[5556] 20 Aug 21:34:28.500 * The server is now ready to accept connections on port 6002
[5556] 20 Aug 21:34:28.501 * Connecting to MASTER localhost:6001
[5556] 20 Aug 21:34:28.513 * MASTER <-> SLAVE sync started
[5556] 20 Aug 21:34:29.513 * Non blocking connect for SYNC fired the event.
[5556] 20 Aug 21:34:29.513 # Sending command to master in replication handshake: -Writing to master: Unknown error
[5556] 20 Aug 21:34:29.516 * Connecting to MASTER localhost:6001
[5556] 20 Aug 21:34:29.517 * MASTER <-> SLAVE sync started

最佳答案

问题已解决,redis.conf 包含 127.0.0.1 作为绑定(bind)值,从从属 redis.conf 文件,我有本地主机的 SLAVE。用 127.0.0.1 替换本地主机解决了问题

关于redis-主从设置失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45784203/

相关文章:

ruby-on-rails - 迭代 Redis 排序集以更新事件记录表

amazon-web-services - 在 terraform 中动态更改 aws_elasticache_replication_group 的配置

node.js - 如何从 Redis 存储客户端的键/值对中的值中获取键?

redis - 将整个 Redis 数据库重命名或复制到另一个数据库?

caching - 在缓存中存储对象集合的方法或策略

redis - 按哈希过滤列表

redis - 具有主/从服务器的 StackExchange.Redis 客户端 - 如何处理失败的主服务器

ruby - 通过 Redis 手动启动 Sidekiq 作业

redis - IRedisClient 使用后未处理

phpredis无法连接到127.0.0.1 :6379