我不是DBA,但我的任务是建立一个数据库和流复制,而repmgr是我决定使用的工具。
主程序进行的很好,我可以看到它在集群中注册。
从服务器上的错误如下
[2016-07-22 15:39:35] [NOTICE] using configuration file "/etc/repmgr/repmgr.conf"
[2016-07-22 15:39:35] [NOTICE] destination directory '/var/lib/postgresql/9.4/main' provided
[2016-07-22 15:39:36] [ERROR] aborting, remote host xx.xxx.xxx.xxx is not reachable.
[2016-07-22 15:39:36] [ERROR] unable to drop replication slot "repmgr_slot_2":
ERROR: replication slot "repmgr_slot_2" does not exist
[2016-07-22 15:39:36] [ERROR] unable to take a base backup of the master server
[2016-07-22 15:39:36] [WARNING] destination directory (/var/lib/postgresql/9.4/main) may need to be cleaned up manually消除abover错误的命令是
repmgr -f /etc/repmgr/repmgr.conf --force --rsync-only -h dbhost1 -d repmgr -U repmgr --verbose standby clone配置文件如下所示
cluster=test
node=2
node_name=db-002
use_replication_slots=1
conninfo='host=dbhost2 user=repmgr dbname=repmgr'
pg_bindir=/usr/lib/postgresql/9.4/bin我已经尝试从dbhost2/从
psql -h xx.xxx.xxx.xxx -p xxxx -d repmgr -U repmgr而且它工作得很好,因此dbhost1/master中的pg_hba文件可以正确配置,使用信任进行身份验证。
发布于 2016-07-25 06:02:51
好吧,我发现问题了。我没有正确地配置我的主从之间的无密码ssh登录。因此,尽管能够从我的奴隶登录到我的主人,但问题是它无法复制文件,因为ssh需要密码。
我唯一的问题是错误报告对repmgr来说是可怕的。
在这个指南之后,我错过了一个非常小的步骤。始终确保您测试ssh的登录在主和从之间的无密码登录,以确保它的设置正确。
https://dba.stackexchange.com/questions/144670
复制相似问题