PostgreSQL La base de donnees la plus sophistiquee au monde.

Forums PostgreSQL.fr

Le forum officiel de la communauté francophone de PostgreSQL

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

#1 28/02/2019 10:49:25

vandeul
Membre

repmgr switchover

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

Hors ligne

#2 28/02/2019 11:22:17

gleu
Administrateur

Re : repmgr switchover

S'il ne trouve pas la commande pg_ctl, c'est que le chemin vers cette commande n'est pas dans le PATH.


Guillaume.

Hors ligne

#3 28/02/2019 16:47:25

vandeul
Membre

Re : repmgr switchover

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

Hors ligne

#4 28/02/2019 17:13:15

gleu
Administrateur

Re : repmgr switchover

Si c'est root qui exécute, oui.


Guillaume.

Hors ligne

#5 01/03/2019 08:48:05

vandeul
Membre

Re : repmgr switchover

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.

Hors ligne

#6 01/03/2019 11:47:08

gleu
Administrateur

Re : repmgr switchover

Aucune idée s'il y a un problème avec repmgr, ne l'utilisant pas.


Guillaume.

Hors ligne

#7 06/03/2019 10:34:29

yohmartin
Membre

Re : repmgr switchover

Bonjour,

pouvez vous mettre votre fichier de conf repmgr ?

merci

Hors ligne

Pied de page des forums