From: | Atul Kumar <akumar14871(at)gmail(dot)com> |
---|---|
To: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: replication strange behavior |
Date: | 2023-11-30 23:42:50 |
Message-ID: | CA+ONtZ5LmX6VCuu1CCTh-Ghs9Kok5LNCsxXRL491b8sJDS5FuA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
In the master pg_hba.conf file, standby server hostname name is not being
read even with the domain name, but server ip is working fine.
output of /etc/hosts is given below
127.0.0.1 localhost localhost.localdomain localhost4
localhost4.localdomain4
::1 localhost localhost.localdomain localhost6
localhost6.localdomain6
<server ip> <hostname>.domainname hostname
Regards.
On Fri, Dec 1, 2023 at 3:33 AM Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:
> On Thu, Nov 30, 2023 at 3:41 PM Atul Kumar <akumar14871(at)gmail(dot)com> wrote:
>
>> Hi,
>>
>> I have postgres 12 running in centos 7.
>>
>> I have configured streaming replication between one master and one
>> standby server.
>>
>> In the pg_hba.conf file of the master server, I have put the standby
>> server's hostname instead of IP and due to which replication got broken and
>> I started getting below error.
>>
>> FATAL: no pg_hba.conf entry for replication connection from host
>> "10.20.8.22", user "replication", SSL off
>>
>> 2023-11-30 12:00:25 PST|pid=24096|FATAL: XX000: could not connect to the
>> primary server: FATAL: no pg_hba.conf entry for replication connection
>>
>> from host "10.20.8.22", user "replication", SSL on
>>
>>
>> I put the ip of standby back in pg_hba.conf file of the master server and
>> replication got started, though in the standby server I mentioned the
>> hostname of master in primary_conninfo on the standby side.
>>
>>
>> So why is the master not reading the hostname of standby ? What am I
>> missing here ?
>>
>
> You'd have to show us pg_hba.conf and /etc/hosts.
>
> My guess, though, is that you're not taking the domain name into account.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | John DeSoi | 2023-12-01 01:26:58 | Re: libpq crashing on macOS during connection startup |
Previous Message | Adrian Klaver | 2023-11-30 22:10:25 | Re: Two started cluster on the same data directory and port |