Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XjUMm-00088n-Ah for pgsql-admin@arkaria.postgresql.org; Wed, 29 Oct 2014 14:36:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XjUMl-0001Sn-QF for pgsql-admin@arkaria.postgresql.org; Wed, 29 Oct 2014 14:36:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XjUMk-0001Sg-Lo for pgsql-admin@postgresql.org; Wed, 29 Oct 2014 14:36:50 +0000 Received: from mail-yh0-x233.google.com ([2607:f8b0:4002:c01::233]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XjUMg-0007a5-23 for pgsql-admin@postgresql.org; Wed, 29 Oct 2014 14:36:49 +0000 Received: by mail-yh0-f51.google.com with SMTP id c41so625079yho.10 for ; Wed, 29 Oct 2014 07:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=KWxvg3qzL1Cboh8o4QnXSVCp4oR8nKykfXLj1lE3qnA=; b=ylGi7nsYDOYap//xq8b+7PXMqxZlGIduFo/9fvCFZioYvMtB9nml0GCx8FL5+5vja5 srbdhoVFtzDPFL9JHkqlxIOHNpm00NlryqGiXtpCL3knDLBXux4O/EH/FS+qK3iynafi XveOXjwVwBMyhYC9BTPudx6ZXk9St8IT6AkTgj2Boo8gxed8Ofi+rxNFVEplLLMs0l+i pFNqVKLRxkWxJyrkZN0M/E+ittpmR/ZsMtc0SUIy6Mz94hQYmd4cMK83bnRulm0HQKb+ eRT8Qqfr1Fztc6wDvoMY75JEcKUGTI4aa03Ktkv+h5gdGjP+EBHfas/u6zigd8sZJ5b1 vPcw== X-Received: by 10.170.131.207 with SMTP id x198mr4391164ykb.47.1414593403940; Wed, 29 Oct 2014 07:36:43 -0700 (PDT) Received: from [192.168.254.2] (h77.89.102.166.static.ip.windstream.net. [166.102.89.77]) by mx.google.com with ESMTPSA id n27sm2016674yhn.24.2014.10.29.07.36.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 07:36:43 -0700 (PDT) Message-ID: <5450FB3D.7030008@gmail.com> Date: Wed, 29 Oct 2014 10:35:41 -0400 From: John Scalia User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Shreeyansh dba CC: "pgsql-admin@postgresql.org" Subject: Re: A local replication entry References: <5450E937.2070408@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------090809090702090602000904" X-Pg-Spam-Score: -2.7 (--) 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 This is a multi-part message in MIME format. --------------090809090702090602000904 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Ok, the line now reads: host replication postgres 127.0.0.1/32 trust And I performed a "service postgresql-9.3 reload", and it still failed with the same error. Then, I tried again using a "-h 127.0.0.1" option for the pg_basebackup. That complained "pg_basebackup: could not connect to server: connection refused." So, I did a "netstat -an | grep 5432" and I see that postgresql is not listening on that port for 127.0.0.1. On 10/29/2014 9:58 AM, Shreeyansh dba wrote: > I suspect there is a small modification is required in pg_hba.conf file :: > > Remove the '#' and modify the line like :: 'host replication postgres 127.0.0.1/32 trust' > > I hope this will help you to resolve the issue > > Thanks and Regards > > Ajinkya Bangale > www.shreeyansh.com > > On Wed, Oct 29, 2014 at 6:48 PM, John Scalia > wrote: > > I think maybe it's just too early in the morning for me, but I can't seem to get a local entry for replication working. I'm trying to create a script for hourly backups using > pg_basebackup, and here's the command I'm using: > > /usr/pgsql-9.3/bin/pg_basebackup -D - -Ft -z -c fast -l hourly.backup > backup_file.gz > > The entry in the pg_hba.conf file is: > > local replication postgres trust > > And the error is: FATAL: no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off, but I have gotten this to work only if I use a "-h > 10.10.1.129" option for the command. This only works since another entry in the pg_hba.conf satisfies the command. > > Do I have an error with the local entry? Or are local entries even allowed for replication? As this has to be automatically deployed to various servers, I'd prefer to NOT > specify each host's IP address both in pg_hba.conf file and in the script calling the pg_basebackup command. Oh, and at some point when this starts working, I am going to > change the user from postgres to another without superuser capability. > -- > Jay > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > > --------------090809090702090602000904 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Ok, the line now reads:

host       replication       postgres         127.0.0.1/32              trust

And I performed a "service postgresql-9.3 reload", and it still failed with the same error. Then, I tried again using a "-h 127.0.0.1" option for the pg_basebackup. That complained "pg_basebackup: could not connect to server: connection refused." So, I did a "netstat -an | grep 5432" and I see that postgresql is not listening on that port for 127.0.0.1.

On 10/29/2014 9:58 AM, Shreeyansh dba wrote:
I suspect there is a small modification is required in pg_hba.conf file ::

Remove the '#' and modify the line like :: 'host    replication    postgres    127.0.0.1/32  trust' 

I hope this will help you to resolve the issue

Thanks and Regards 

Ajinkya Bangale

On Wed, Oct 29, 2014 at 6:48 PM, John Scalia <jayknowsunix@gmail.com> wrote:
I think maybe it's just too early in the morning for me, but I can't seem to get a local entry for replication working. I'm trying to create a script for hourly backups using pg_basebackup, and here's the command I'm using:

/usr/pgsql-9.3/bin/pg_basebackup -D - -Ft -z -c fast -l hourly.backup > backup_file.gz

The entry in the pg_hba.conf file is:

local    replication    postgres                            trust

And the error is: FATAL: no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off, but I have gotten this to work only if I use a "-h 10.10.1.129" option for the command. This only works since another entry in the pg_hba.conf satisfies the command.

Do I have an error with the local entry? Or are local entries even allowed for replication? As this has to be automatically deployed to various servers, I'd prefer to NOT specify each host's IP address both in pg_hba.conf file and in the script calling the pg_basebackup command. Oh, and at some point when this starts working, I am going to change the user from postgres to another without superuser capability.
--
Jay


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


--------------090809090702090602000904--