簡體   English   中英

repmgr 備用切換失敗,錯誤:無法通過 SSH 連接到主機“節點 IP”,用戶“”

[英]repmgr standby switchover failed with ERROR: unable to connect via SSH to host "node IP", user ""

repmgr standby switchover -v 信息:在 /etc 中查找配置文件 信息:配置文件位於:“/etc/repmgr.conf” 注意:在節點“DB-Test-02”(ID:2)上執行切換 警告:無法通過 SSH 連接到遠程主機“IP” 錯誤:無法通過 SSH 連接到主機“IP”,用戶“”

repmgrd 服務在主服務器、備用服務器和見證服務器上停止。

我通過使用 SSH 相互連接節點進行了檢查,這很有效。

有什么提示嗎?

要成功切換密碼,需要少 SSH。 試試這個。 https://tecadmin.net/password-less-ssh-login-setup/

第二個是,需要在 /etc/sudoers 文件中設置以下命令。

    Defaults:postgres !requiretty
    postgres ALL = NOPASSWD: /usr/bin/pg_ctlcluster 12 main stop, \
    /usr/bin/pg_ctlcluster 12 main start, \
    /usr/bin/pg_ctlcluster 12 main restart \
    /usr/bin/pg_ctlcluster 12 main reload

在 /etc/repmgr.conf 文件中。

     service_start_command   = 'sudo pg_ctlcluster 12 main start'
     service_stop_command    = 'sudo pg_ctlcluster 12 main stop'
     service_restart_command = 'sudo pg_ctlcluster 12 main restart'
     service_reload_command  = 'sudo pg_ctlcluster 12 main reload'

這對我有用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM