Vous n'êtes pas identifié(e).

#1 Re : Réplication » repmgr switchover » 01/03/2019 08:48:05

Non justement c'est pas root... Il y a pas un problème avec repmgr. J'ai du aussi faire dans mon home du user un lien vers mon fichier repmgr.conf car dans les traces du DEBUG mon -f xxx/xxx/repmgr.conf devient -f ./repmgr.conf.

#2 Réplication » repmgr failover multi nodes » 28/02/2019 16:50:27

vandeul
Réponses : 1

Bonjour,

Je suis dans la situation suivante :

ID | Name   | Role    | Status    | Upstream | Location | Connection string
----+--------+---------+-----------+----------+----------+-----------------------------------------------------------------------
1  | PRMDBA | primary | * running |          | default  | host=172.22.20.42 port=5128 user=repmgr dbname=DBA1 connect_timeout=2
2  | ST1DBA | standby |   running | PRMDBA   | default  | host=172.22.28.52 port=5128 user=repmgr dbname=DBA1 connect_timeout=2
3  | ST2DBA | standby |   running | PRMDBA   | default  | host=172.22.20.43 port=5128 user=repmgr dbname=DBA1 connect_timeout=2


Lorsque je coupe PRMDBA , le  promote commande ne fonctionne pas en automique sur ST1DBA (marche en manuel) :

promote_command='/usr/pgsql-10/bin/repmgr standby promote -f /etc/repmgr/10/repmgr.conf --log-to-file'

J'ai bien un daemon qui tourne  :

rfrbpdba 31635     1  0 15:38 ?        00:00:00 /usr/pgsql-10/bin/repmgrd -f /etc/repmgr/10/repmgr.conf


Avez vous une idée ?.

Merci

#3 Re : Réplication » repmgr switchover » 28/02/2019 16:47:25

Pour que cela fonctionne je dois ajouter pg_ctl dans le PATH de root.

#4 Réplication » repmgr switchover » 28/02/2019 10:49:25

vandeul
Réponses : 6

La commande repmgr switchover ne trouve pas pg_ctl :

/usr/pgsql-10/bin/repmgr standby switchover -f /etc/repmgr/10/repmgr.conf --remote-user rfrbpdba --siblings-follow
DEBUG: connecting to: "user=repmgr connect_timeout=2 dbname=DBA1 host=172.22.20.42 port=5128 fallback_application_name=repmgr"
NOTICE: executing switchover on node "PRMDBA" (ID: 1)
DEBUG: connecting to: "user=repmgr connect_timeout=2 dbname=DBA1 host=172.22.28.52 port=5128 fallback_application_name=repmgr"
DEBUG: remote_command():
  ssh -o Batchmode=yes -q -o ConnectTimeout=10 rfrbpdba@172.22.28.52 /usr/pgsql-10/bin/repmgr -f ./repmgr.conf --version 2>/dev/null && echo "1" || echo "0"
WARNING: option "--sibling-nodes" specified, but no sibling nodes exist
DEBUG: remote_command():
  ssh -o Batchmode=yes -q -o ConnectTimeout=10 rfrbpdba@172.22.28.52 /usr/pgsql-10/bin/repmgr -f ./repmgr.conf node check --remote-node-id=1 --replication-connection
DEBUG: connecting to: "user=repmgr connect_timeout=2 dbname=DBA1 host=172.22.28.52 port=5128 fallback_application_name=repmgr"
DEBUG: remote_command():
  ssh -o Batchmode=yes -q -o ConnectTimeout=10 rfrbpdba@172.22.28.52 /usr/pgsql-10/bin/repmgr -f ./repmgr.conf node check --terse -LERROR --archive-ready --optformat
DEBUG: lag is 0
DEBUG: minimum of 1 free slots (0 for siblings) required; 3 available
DEBUG: connecting to: "user=repmgr connect_timeout=2 dbname=DBA1 host=172.22.20.42 port=5128 fallback_application_name=repmgr"
DEBUG: connecting to: "user=repmgr connect_timeout=2 dbname=DBA1 host=172.22.28.52 port=5128 fallback_application_name=repmgr"
NOTICE: local node "PRMDBA" (ID: 1) will be promoted to primary; current primary "ST1DBA" (ID: 2) will be demoted to standby
NOTICE: stopping current primary node "ST1DBA" (ID: 2)
DEBUG: remote_command():
  ssh -o Batchmode=yes -q -o ConnectTimeout=10 rfrbpdba@172.22.28.52 /usr/pgsql-10/bin/repmgr -f ./repmgr.conf node service --action=stop --checkpoint
DEBUG: connecting to: "user=repmgr connect_timeout=2 dbname=DBA1 host=172.22.28.52 port=5128 fallback_application_name=repmgr"
NOTICE: issuing CHECKPOINT
DETAIL: executing server command "pg_ctl stop -D /rece/fr/DBA/pgrdb/RFRDBA1/pgdata"
sh: pg_ctl: command not found
INFO: checking for primary shutdown; 1 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 2 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 3 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 4 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 5 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 6 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 7 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 8 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 9 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 10 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 11 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 12 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 13 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 14 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 15 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 16 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK

Je ne comprends aussi pourquoi -f /etc/repmgr/10/repmgr.conf  et transformé en -f ./repmgr.conf j'ai du faire un lien dans le home de mon user distant.

Merci

Pied de page des forums

Propulsé par FluxBB