【postgresql】ERROR: unable to connect via SSH to host “192.168.1.10“, user ““

1.repmgr 主从切换 报错 

[pgsql@pg2:/home/pgsql]$repmgr -f /postgresql/app/postgresql/repmgr.conf standby switchover --siblings-follow --dry-run --force-rewindNOTICE: checking switchover on node "pg2" (ID: 2) in --dry-run mode
INFO: prerequisites for using pg_rewind are met
WARNING: unable to connect to remote host "192.168.1.10" via SSH
ERROR: unable to connect via SSH to host "192.168.1.10", user ""
无法切换成功。配置ssh;

2号节点没有配置到其他节点的免密登陆,重新配置就可以了。

2.配置免密登陆重试 

需要重新在2号节点配置SSH免密登陆。
[pgsql@pg2:/home/pgsql]$repmgr -f /postgresql/app/postgresql/repmgr.conf standby switchover --siblings-follow --dry-run --force-rewindNOTICE: checking switchover on node "pg2" (ID: 2) in --dry-run mode
INFO: prerequisites for using pg_rewind are met
INFO: SSH connection to host "192.168.1.10" succeeded
INFO: able to execute "repmgr" on remote host "192.168.1.10"
INFO: all sibling nodes are reachable via SSH
INFO: 3 walsenders required, 10 available
INFO: demotion candidate is able to make replication connection to promotion candidate
WARNING: number of pending archive files on demotion candidate "pg1" exceeds the warning threshold
DETAIL: 23 pending archive files (warning threshold: 16)
HINT: PostgreSQL will not shut down until all files are archived
INFO: replication lag on this standby is 0 seconds
INFO: 3 replication slots required, 10 available
NOTICE: attempting to pause repmgrd on 4 nodes
NOTICE: local node "pg2" (ID: 2) would be promoted to primary; current primary "pg1" (ID: 1) would be demoted to standby
INFO: following shutdown command would be run on node "pg1":
  "/postgresql/app/postgresql/bin/pg_ctl stop -w -D /postgresql/data"
INFO: parameter "shutdown_check_timeout" is set to 60 seconds
INFO: prerequisites for executing STANDBY SWITCHOVER are met

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值