Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXyDi-0000P4-80 for pgsql-admin@arkaria.postgresql.org; Fri, 22 Nov 2019 01:58:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iXyDe-0000Er-Qq for pgsql-admin@arkaria.postgresql.org; Fri, 22 Nov 2019 01:58:46 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXyDe-0000Ef-Gb for pgsql-admin@lists.postgresql.org; Fri, 22 Nov 2019 01:58:46 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iXyDa-0000Uy-Nu for pgsql-admin@postgresql.org; Fri, 22 Nov 2019 01:58:45 +0000 Received: by mail-pl1-x643.google.com with SMTP id o9so2424612plk.6 for ; Thu, 21 Nov 2019 17:58:42 -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-language:content-transfer-encoding; bh=L2qRNtHoO/PeGayRbcCLYAAqeRCc5MvOHHv3M40Txm4=; b=HicnZtJFQWJf4y9fVK+uLRYVYv439q2WyVrI+GlKxgApPDDi+X64s/XFHS/Nk2Jx6T W3pl3lal1mhaFn20cV13h1K1PrZIn8ex5fstEXzn84dAv7kdUgFlTxULDWPJ1IFynAmx nI6d0334syYHItGPZR6BTltJ3X16Y2w6zyTv7dUxjoVHj7p9G63AdeHPYV+zfs3LBVEj RPuorIJwuuy9pYR809aloONm3euheNwjPrO2iOl8zw8TxRbYAfsIlGLpeMzZusO94n21 JZSMcIWfVw7L9VJhY4gYmsF9xu2hWKwtxECbep0sMdguURuaenATVjPwgc218XXFNn8l cTNw== 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-language :content-transfer-encoding; bh=L2qRNtHoO/PeGayRbcCLYAAqeRCc5MvOHHv3M40Txm4=; b=mjm239pmq3x+F/2QnMSH/MmGopDao2JLuL+5iBTY+pUWTWm03qwS5SBjslzyTPYcoN bAHUdPILwN0cVSxOQkhzzSIrWZGttx1wU7PJ80BApnbQDlxeFe/FCUXsr89WJwQc1xBp N9pnzdfAx1D8MA8RCWSln69eiE04fvVvfe3LwSomwZyrNShxoF+g72mmrvxJiTeZTMX9 0CYeTP6oIp5NnomaOvyKUlwMoBkTDobj4VChIQVW4URSsFc4AOG4ai5bEba4d0hBGj4u FIG25UsRgskmLXZxl3MzbalHmcmPJ4mty/lnzHdpyY+AA6y8+LSRT2cAM5olXvc4JGn6 EfLQ== X-Gm-Message-State: APjAAAWUmFEoGmnCXOUhRN6fH1ejav+qSeHFIY4AYVAuE1dfBV5GDh2q +5EnPH+qNVC9AMX06NAu80VWcSJpO65MyW2tZaJ4EmQ4bmUqllbPUQ6ReML28ThWGyBV/9I/Nne 06SPdXlXKHtLiYXZ3UKjJNHdrhzyc8mAwrxLtyZPUsNDhkVOB9Ud4cOGyqQXYehzStVq0Cz5QvQ X1110TUoc= X-Google-Smtp-Source: APXvYqx//t7OUHJjFSnyo+36IyHZWk4lOV1CE9eBjSnDk6zKRuFJjP6vLGpIe9UD9EBcHiBbGe4wkA== X-Received: by 2002:a17:90b:11cb:: with SMTP id gv11mr15496683pjb.61.1574387919010; Thu, 21 Nov 2019 17:58:39 -0800 (PST) Received: from osaka.octopusnet (p8196190-ipngn41801marunouchi.tokyo.ocn.ne.jp. [124.84.46.190]) by smtp.gmail.com with ESMTPSA id r4sm776965pji.11.2019.11.21.17.58.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Nov 2019 17:58:38 -0800 (PST) Subject: Re: Trouble setting up Streaming Replication with Barman To: Evan Walter , pgsql-admin@postgresql.org References: From: Ian Barwick Message-ID: <0c2bc048-3487-35f3-6263-3b00efcc6745@2ndquadrant.com> Date: Fri, 22 Nov 2019 10:58:35 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019/11/22 7:07, Evan Walter wrote: > Hello, > I am trying to set up streaming replication with barman, going down the tutorial. > > When I run/ I get: > > $barman receive-wal --create-slot pg > > ERROR: Cannot connect to server 'pg' > > $cat /etc/barman.d/pg.conf > [pg] (...) > streaming_conninfo = host= user=streaming_barman dbname=postgres (...) > $nano /etc/postgresql/12/main/pg_hba.conf (...) > host all streaming_barman  /32    md5 The "streaming_barman" user should be a user with replication permissions (if not already set, execute "ALTER USER streaming_barman REPLICATION") and appropriate permission granted in "pg_hba.conf": host replication streaming_barman /32 md5 > The Barman Server (logged in as barman): ############################### > $psql -c 'SELECT version()' -U barman -h postgres Check the replication connection works with: psql -c 'IDENTIFY_SYSTEM' 'host= dbname=postgres user=streaming_barman replication=1' Regards Ian Barwick -- Ian Barwick https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services