全量同步失败报错,关键词“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.
可能原因
访问源库或目标库时建立连接失败。
解决方案
请按照如下思路排查:
- 检查源库或目标库运行状态是否正常。
- 检查源库或目标库监听端口是否放通了DRS的IP。
- 公网模式的DRS任务,源库需要放通DRS的弹性公网IP,目标库需要放通DRS的内网IP。
- VPC模式、VPN、专线模式的DRS任务,源库和目标库都需要放通DRS的内网IP。