repmgr reconfiguration after a network change

18 views
Skip to first unread message

mattb...@gmail.com

unread,
Oct 25, 2022, 11:24:48 AM10/25/22
to repmgr
Hello,

repmgr 5.3.2
Postgres 13
Ubuntu 20.04

We had to move the primary and standby servers to another network.
I found an old thread about dong an update of repl_nodes but I wasn't sure if applicable for my version.

I used
repmgr primary register -f /path/to/repmgr.conf - which has the correct conninfo details.
and all looks good under "cluster show".

No luck on the standby doing the equivalent and it shows the wrong fqdn for the primary under "cluster show".

Standby did not like an "unregister" attempt.

pg_hba.conf looks good on both ends.

Not sure what needs to be done/how this should be approached. Would appreciate some magic commands please.

Rgs,

Matt

mattb...@gmail.com

unread,
Oct 25, 2022, 11:39:37 AM10/25/22
to repmgr
Some details of the conf and error :

PRIMARY
[postgres@nav-postgres1  ~]$ cluster_status
 ID    | Name                | Role    | Status        | Upstream              | Location | Priority | Timeline | Connection string
-------+---------------------+---------+---------------+-----------------------+----------+----------+----------+------------------------------------------------------------------------------------------------
 22655 | nav-postgres1 | primary | * running     |                       | default  | 100      | 3        | host=nav-postgres1.NEWNETWORK user=repmgr dbname=repmgr port=5432 connect_timeout=2
 55483 | nav-postgres2 | standby | ? unreachable | ? nav-postgres1          | default  | 100      |          | host=nav-postgres2.mynetwork user=repmgr dbname=repmgr port=5432 connect_timeout=2

WARNING: following issues were detected
  - unable to connect to node "nav-postgres2" (ID: 55483)
  - node "nav-postgres2" (ID: 55483) is registered as an active standby but is unreachable

HINT: execute with --verbose option to see connection error messages

STANDBY
[postgres@nav-postgres2  log]$ cluster_status
 ID    | Name                | Role    | Status        | Upstream              | Location | Priority | Timeline | Connection string
-------+---------------------+---------+---------------+-----------------------+----------+----------+----------+------------------------------------------------------------------------------------------------
 22655 | nav-postgres1 | primary | ? unreachable | ?                     | default  | 100      |          | host=nav-postgres1.mynetwork user=repmgr dbname=repmgr port=5432 connect_timeout=2
 55483 | nav-postgres2 | standby | ? unreachable | ? nav-postgres1          | default  | 100      |          | host=nav-postgres2.mynetwork user=repmgr dbname=repmgr port=5432 connect_timeout=2

WARNING: following issues were detected
  - unable to connect to node "nav-postgres1" (ID: 22655)
  - node "nav-postgres1" (ID: 22655) is registered as an active primary but is unreachable
  - unable to connect to node "nav-postgres2" (ID: 55483)
  - node "nav-postgres2" (ID: 55483) is registered as an active standby but is unreachable

HINT: execute with --verbose option to see connection error messages

[postgres@nav-postgres2  log]$ repmgr standby register --force -f /etc/repmgr/13/repmgr.conf
INFO: connecting to local node "nav-postgres2" (ID: 55483)
INFO: connecting to primary database
ERROR: connection to database failed
DETAIL:
timeout expired

DETAIL: attempted to connect using:
  user=repmgr connect_timeout=2 dbname=repmgr host=nav-postgres1.mynetwork port=5432 fallback_application_name=repmgr options=-csearch_path=
ERROR: connection to database failed
DETAIL:
timeout expired

DETAIL: attempted to connect using:
  user=repmgr connect_timeout=2 dbname=repmgr host=nav-postgres2.mynetwork port=5432 fallback_application_name=repmgr options=-csearch_path=
ERROR: unable to connect to the primary database
HINT: a primary node must be configured before registering a standby node
Reply all
Reply to author
Forward
0 new messages