Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdgAM-0006Cm-4c for pgsql-admin@arkaria.postgresql.org; Tue, 14 Feb 2017 16:41:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cdgAL-0003M7-D6 for pgsql-admin@arkaria.postgresql.org; Tue, 14 Feb 2017 16:41:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cdg8c-0001JE-Aj for pgsql-admin@postgresql.org; Tue, 14 Feb 2017 16:39:34 +0000 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cdg8U-000246-CW for pgsql-admin@postgresql.org; Tue, 14 Feb 2017 16:39:33 +0000 Received: by mail-oi0-x242.google.com with SMTP id u143so1403726oif.3 for ; Tue, 14 Feb 2017 08:39:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-transfer-encoding:thread-index:content-language; bh=/Wb7KfheYrzjzqo4kXlbvFaxj3uUwr3A7mO7yx7F6Fo=; b=JBY4PPnWU5AIrxwXu3JsUpZp7H6HoCMQ6Ug7tqbuHrOyK96RNe3Y7Td5M6BnHgfUyk q8mPEXTjX6R31AdGnuB92A9ws6mhAqiCJbigJQ943zPDtElRiDRcYoQgy65UQNoCEsJe yHL6K6oWERfqFubGTGmkuSemlkC3AwUp+u16oIeDJL3U1NzC12xGGT+Hqhc3Q8xeE9li uB7fsd2/qLlXkArL55SeSep8h4Xh7whzvLRZBXvD3bSmZaAYmveRsE1YVYMYqpRehXqj r7ihi6vFmK/Nf0s/yB7qwUxfk//fi+dqEfxYK2genlPoPcj8E/FpIpTjpjRwquN6TTAt 240w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=/Wb7KfheYrzjzqo4kXlbvFaxj3uUwr3A7mO7yx7F6Fo=; b=DwxmKmIl77QHbyins2eMj7/GXxCI5a/V+6F04KqUB2AP+M7vzl2GVU7vcDgVVk4jyi SqqXQOYvYWUEu0UHiG70uhqg6DfjfT2p2WLjC2INRIFrbeokEQ4WzvSSPVddkmoFtlwc 8yZGrVkbVvhAwTfckfqH8CcZgOVNlnwMsr7Tb8HsVuZd4CD4fMj/t0zzEJKouwHmlCLV j2mrsfy65gNcYoodLzD93UXEC3u1PEsv88Dlso06gfAaS4qnBjbpxBjLtErP4HuYEDnc EF8IVTZKV/Fk4yepV/Iky1AHHNvckIUCubWl6P+FDPZ3PbLFXk+kFIyu3RjpDAVf+KEH 60pQ== X-Gm-Message-State: AMke39luL2yzN9EsMv2jTDo3bpdZYyqw+so6vaTi88LWPt7A5FE3aej62zfskPc/UoM0pg== X-Received: by 10.107.186.134 with SMTP id k128mr26686767iof.71.1487090364311; Tue, 14 Feb 2017 08:39:24 -0800 (PST) Received: from irylachi ([200.55.161.75]) by smtp.gmail.com with ESMTPSA id 80sm533447ioq.49.2017.02.14.08.39.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Feb 2017 08:39:23 -0800 (PST) From: "Lazaro Garcia" To: "'Ian Barwick'" , References: <005201d28605$f4204640$dc60d2c0$@gmail.com> In-Reply-To: Subject: Re: repmgr error with automated failover Date: Tue, 14 Feb 2017 11:39:26 +0100 Message-ID: <000801d286ae$9ef16f60$dcd44e20$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQImFnhopUjGqPgcQ7PycUHhskfYWwMELlKXoKkL3lA= Content-Language: es-mx X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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