REDIS 从站无法连接主站



Redis 从站无法连接到 Redis 主站。 我们在 Azure 服务器上设置了 redis。

以下是 redis 日志,

Connecting to MASTER MasterIP:6379
* MASTER <-> SLAVE sync started
* Non blocking connect for SYNC fired the event.
* Master replied to PING, replication can continue...
* Partial resynchronization not possible (no cached master)
* Master does not support PSYNC or is in error state (reply: -ERR Can't SYNC while not connected with my 
* Retrying with SYNC...
# MASTER aborted replication with an error: ERR Can't SYNC while not connected with my master

还要在从属连接丢失时找到主 redis 连接,

* Background saving terminated with success
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
# Connection with slave  IP:6379 lost.
* SLAVE OF **UNKNOWN IP**:8888 enabled (user request)
* Connecting to MASTER **UNKNOW IP**:8888
* MASTER <-> SLAVE sync started
* Non blocking connect for SYNC fired the event.
* Master replied to PING, replication can continue...
# Unable to AUTH to MASTER: -Reading from master: Connection timed out

在这里,master会自动尝试连接到一些未知IP。

我怎样才能进一步调试?

# Replication
role:slave
master_host:xxx.xx.xx.xxx
master_port:xxxx
master_link_status:up
master_last_io_seconds_ago:6
master_sync_in_progress:0
  1. 使用命令"info"检查 Redis 从属服务器的复制状态,确保角色是 Slave
  2. 检查master_link_status是否启动,如果关闭,可能有两个原因:
    (1( 尝试与 MASTER 同步时出现 I/O 错误:连接丢失
    使用config set client-output-buffer-limit ‘slave 512mb 128mb 120’(客户端输出缓冲区限制(更改缓冲区限制或更改配置文件
    (2( 无法将缓冲区绑定到主服务器:-ERR 客户端发送了身份验证,但没有设置
    密码,如果不正确,请更改密码

相关内容

  • 没有找到相关文章

最新更新