首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ubuntu上的repmgr 3.0.4和postgres 9.4 (错误:复制槽"repmgr_slot_2“不存在)

ubuntu上的repmgr 3.0.4和postgres 9.4 (错误:复制槽"repmgr_slot_2“不存在)
EN

Database Administration用户
提问于 2016-07-22 15:56:23
回答 1查看 878关注 0票数 0

我不是DBA,但我的任务是建立一个数据库和流复制,而repmgr是我决定使用的工具。

主程序进行的很好,我可以看到它在集群中注册。

从服务器上的错误如下

代码语言:javascript
复制
[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错误的命令是

代码语言:javascript
复制
repmgr -f /etc/repmgr/repmgr.conf --force --rsync-only -h dbhost1 -d repmgr -U repmgr --verbose standby clone

配置文件如下所示

代码语言:javascript
复制
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/从

代码语言:javascript
复制
psql -h xx.xxx.xxx.xxx -p xxxx -d repmgr -U repmgr

而且它工作得很好,因此dbhost1/master中的pg_hba文件可以正确配置,使用信任进行身份验证。

EN

回答 1

Database Administration用户

回答已采纳

发布于 2016-07-25 06:02:51

好吧,我发现问题了。我没有正确地配置我的主从之间的无密码ssh登录。因此,尽管能够从我的奴隶登录到我的主人,但问题是它无法复制文件,因为ssh需要密码。

我唯一的问题是错误报告对repmgr来说是可怕的。

在这个指南之后,我错过了一个非常小的步骤。始终确保您测试ssh的登录在主和从之间的无密码登录,以确保它的设置正确。

票数 0
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/144670

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档