Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdSMg-0004Ql-5V for pgsql-admin@arkaria.postgresql.org; Tue, 14 Feb 2017 01:57:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cdSMf-0000Un-I1 for pgsql-admin@arkaria.postgresql.org; Tue, 14 Feb 2017 01:57:09 +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 1cdSKw-0006vW-No for pgsql-admin@postgresql.org; Tue, 14 Feb 2017 01:55:22 +0000 Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cdSKp-0008UE-KO for pgsql-admin@postgresql.org; Tue, 14 Feb 2017 01:55:21 +0000 Received: by mail-it0-x22b.google.com with SMTP id 203so13661407ith.0 for ; Mon, 13 Feb 2017 17:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=KQrXzCCwm15xNck/kCq8aSxHH2SdLTGVMBWLG1vGylg=; b=s6Ke6nl30oNtP17POOaxNAQnVMuALkV5AjjdwmSzmjdIubQfHHh6wLK4SBulZn57uY ZcElC9d85JtjU9VYsnXlcGj6rwnnzZt+aqHngHseJxIE1W+Xws5g6EkczuM9crobbl8F mL3Powh+kX+EZPClqqbkVc19HdbLI3/Ajd9NQ5cTNvMBs7HxeUkAk+rvqcvUj70pYNHq jRmy2vleGw85guiYj4xUwWovGtIkZUQX6K9iUms5GVa/YyJLLFIX2C7bvRdAHZUKq3KV OPUu03wU8qFcySrSpRoC/3MqA0kE7FL8n4WcMtBdZCyYgE1rTY/zP2Kt1ZCXApJ6GAkG Uy9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=KQrXzCCwm15xNck/kCq8aSxHH2SdLTGVMBWLG1vGylg=; b=GTLGzeV01mq3pPHTHuQVZrHAFeFipwuvNZajaeTf3IpRM3nYZyPo2up27uJHTQxoMt l06KvsNXBOJjoHAGByNKc3guk+H3W4cS8MsBDYGwl7goB2keAaTkG57/RzMjk4vEit38 WXmtorxjXqv6IjrR+kxalAqYybV65JVPXAxIRLCy3FBXfwwuzNr+2bbWgaSSyR36O8nb 2k4v2PU2wIZkCkcJyLCgMzhe2YhEUVthBIzs5JkTZLiFt9pwH9AyeNJ8RRPr/XwPS7xH enoNTQH9uOSAQ2RX6JEN6/7H4UeSMBCzFSgNuzftd35B/uaWV9WYsHEc/fWOs8AeW67u fc7g== X-Gm-Message-State: AMke39kXLmM4m2dootJd8M/qfTLofgF5ppQ+ypZyzV8k1PODvm0mnf81ZeN+BAKQ+N/P1WRPMZYnYU8VKXWSaZcEQQBJi5BbuYZkMDWT7Jyn3FeWrpnDyFlPF8nIh1Y/wI3NU4kPAB3X5sBzuPAYHg38rnkbolHhqqU5+ykK77yCDQTtDpLDFiCvrewspo+0m/mfM1pn X-Received: by 10.99.167.10 with SMTP id d10mr30184809pgf.19.1487037312984; Mon, 13 Feb 2017 17:55:12 -0800 (PST) Received: from osaka.octopusnet (p7060-ipngn5901marunouchi.tokyo.ocn.ne.jp. [153.162.86.60]) by smtp.gmail.com with ESMTPSA id c2sm23117444pfl.61.2017.02.13.17.55.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Feb 2017 17:55:11 -0800 (PST) Subject: Re: repmgr error with automated failover To: Lazaro Garcia , pgsql-admin@postgresql.org References: <005201d28605$f4204640$dc60d2c0$@gmail.com> From: Ian Barwick Message-ID: Date: Tue, 14 Feb 2017 10:55:09 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <005201d28605$f4204640$dc60d2c0$@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.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 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