pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedrepmgr error with automated failover
3+ messages / 2 participants
[nested] [flat]
* repmgr error with automated failover
@ 2017-02-13 14:32 Lazaro Garcia <lazaro3487@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Lazaro Garcia @ 2017-02-13 14:32 UTC (permalink / raw)
To: pgsql-admin
Hello every one in the list. First thanks to repmgr.
I took several days testing repmgr but I can't execute an automated failover
properly.
I have 2 nodes, a master(node1) and a slave(nodo2). The repmgrd service is
running on both servers. When node1 goes down an automated failover take
place and node2 is promounted as master, at this point all is ok, the
problems comes when node2 is attached again to the cluster, for
incorporating this node to the cluster I run this commands:
1. executes a clone command on node1
su -c 'repmgr -h node2 -U repmgr -d repmgr -D /var/lib/postgresql/9.6/main/
-f /etc/postgresql/9.6/main/repmgr.conf --rsync-only --force standby clone'
postgres
2. start up the postgres service on node1
3. Register this node
su -c 'repmgr -f /etc/postgresql/9.6/main/repmgr.conf --force standby
register' postgres
Then stops node2 but node1 is never promoted as master.
Why node1 is not promoted? Is there something wrong?
Regards.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: repmgr error with automated failover
@ 2017-02-14 01:55 Ian Barwick <ian.barwick@2ndquadrant.com>
parent: Lazaro Garcia <lazaro3487@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Ian Barwick @ 2017-02-14 01:55 UTC (permalink / raw)
To: Lazaro Garcia <lazaro3487@gmail.com>; pgsql-admin
Hi
On 02/13/2017 11:32 PM, Lazaro Garcia wrote:
> Hello every one in the list. First thanks to repmgr.
>
>
>
> I took several days testing repmgr but I can't execute an automated failover
> properly.
>
>
>
> I have 2 nodes, a master(node1) and a slave(nodo2). The repmgrd service is
> running on both servers. When node1 goes down an automated failover take
> place and node2 is promounted as master, at this point all is ok, the
> problems comes when node2 is attached again to the cluster, for
> incorporating this node to the cluster I run this commands:
>
> 1. executes a clone command on node1
>
> su -c 'repmgr -h node2 -U repmgr -d repmgr -D /var/lib/postgresql/9.6/main/
> -f /etc/postgresql/9.6/main/repmgr.conf --rsync-only --force standby clone'
> postgres
>
>
>
> 2. start up the postgres service on node1
>
>
>
> 3. Register this node
>
> su -c 'repmgr -f /etc/postgresql/9.6/main/repmgr.conf --force standby
> register' postgres
>
>
>
> Then stops node2 but node1 is never promoted as master.
>
> Why node1 is not promoted? Is there something wrong?
Is repmgrd running on node1? Is its repmgr.conf file configured
correctly, e.g. "failover=automatic"
Regards
Ian Barwick
--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: repmgr error with automated failover
@ 2017-02-14 10:39 Lazaro Garcia <lazaro3487@gmail.com>
parent: Ian Barwick <ian.barwick@2ndquadrant.com>
0 siblings, 0 replies; 3+ messages in thread
From: Lazaro Garcia @ 2017-02-14 10:39 UTC (permalink / raw)
To: 'Ian Barwick' <ian.barwick@2ndquadrant.com>; pgsql-admin
Ian thank you very much for the help.
I found the problem.
When an automated failover take places, the repmgr process on the failed
node dies.
Postgresql service stops on Node1 , Node2 is promoted as master
automaticaly, but repmgr on node1 stops, and I need to start repmgr again
after recover Node1.
Is this the expected behavior?
Regards.
-----Mensaje original-----
De: Ian Barwick [mailto:ian.barwick@2ndquadrant.com]
Enviado el: martes, 14 de febrero de 2017 02:55 a. m.
Para: Lazaro Garcia; pgsql-admin@postgresql.org
Asunto: Re: [ADMIN] repmgr error with automated failover
Hi
On 02/13/2017 11:32 PM, Lazaro Garcia wrote:
> Hello every one in the list. First thanks to repmgr.
>
>
>
> I took several days testing repmgr but I can't execute an automated
> failover properly.
>
>
>
> I have 2 nodes, a master(node1) and a slave(nodo2). The repmgrd
> service is running on both servers. When node1 goes down an automated
> failover take place and node2 is promounted as master, at this point
> all is ok, the problems comes when node2 is attached again to the
> cluster, for incorporating this node to the cluster I run this commands:
>
> 1. executes a clone command on node1
>
> su -c 'repmgr -h node2 -U repmgr -d repmgr -D
> /var/lib/postgresql/9.6/main/ -f /etc/postgresql/9.6/main/repmgr.conf
--rsync-only --force standby clone'
> postgres
>
>
>
> 2. start up the postgres service on node1
>
>
>
> 3. Register this node
>
> su -c 'repmgr -f /etc/postgresql/9.6/main/repmgr.conf --force standby
> register' postgres
>
>
>
> Then stops node2 but node1 is never promoted as master.
>
> Why node1 is not promoted? Is there something wrong?
Is repmgrd running on node1? Is its repmgr.conf file configured correctly,
e.g. "failover=automatic"
Regards
Ian Barwick
--
Ian Barwick http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-02-14 10:39 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-13 14:32 repmgr error with automated failover Lazaro Garcia <lazaro3487@gmail.com>
2017-02-14 01:55 ` Ian Barwick <ian.barwick@2ndquadrant.com>
2017-02-14 10:39 ` Lazaro Garcia <lazaro3487@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox