文档首页/ 数据复制服务 DRS/ 故障排除/ 失败案例/ PostgreSQL->PostgreSQL实时同步/ 全量同步失败报错,关键词“Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections”
更新时间:2022-12-27 GMT+08:00
分享

全量同步失败报错,关键词“Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections”

场景描述

全量同步期间DRS任务报错,同步日志界面提示:service DATAMOVE failed, cause by: source engine postgresql client initialize failed, detail: Unable to connect to DBMS: url=%s/position3.0?client_encoding=UTF-8&ssl=false&sslmode=prefer user=%s, Caused by: Connection to %s refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

可能原因

访问源库或目标库时建立连接失败。

解决方案

请按照如下思路排查:

  1. 检查源库或目标库运行状态是否正常。
  2. 检查源库或目标库监听端口是否放通了DRS的IP。
    • 公网模式的DRS任务,源库需要放通DRS的弹性公网IP,目标库需要放通DRS的内网IP。
    • VPC模式、VPN、专线模式的DRS任务,源库和目标库都需要放通DRS的内网IP。

相关文档