pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem with replication
7+ messages / 3 participants
[nested] [flat]

* Problem with replication
@ 2020-03-23 18:30 Douglas Reed <dougreed765@yahoo.com>
  2020-03-23 18:33 ` Re: Problem with replication Holger Jakobs <holger@jakobs.com>
  2020-03-23 19:27 ` Re: Problem with replication Loai Abdallatif <loai.abdallatif@gmail.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Douglas Reed @ 2020-03-23 18:30 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Matthew Couper <mcouper@fsbtech.com>; Andrew Jobson <andrew@fsbtech.com>

Hi
We are running Pg Version 9.6
On OS Centos 7 running on a VM (Nutanix)
We are trying to build a slave server on this platform. The relevant IP entry for replication has been placed in pg_hba.conf on the master. We run pg_basebackup successfully and then set up recovery.conf etc and re-start the slave database. It seems to process the WALs and then enter the read only state when it then generates the following errors;
Mar 23 15:22:48 xds-data1-temp postgres[13072]: [2-1] user=,db=,app=client= LOG:  database system is ready to accept read only connectionsMar 23 15:22:49 xds-data1-temp postgres[13083]: [3-1] user=[unknown],db=[unknown],app=[unknown]client=[local] LOG:  connection received: host=[local]Mar 23 15:22:49 xds-data1-temp postgres[13083]: [4-1] user=postgres,db=[unknown],app=[unknown]client=[local] FATAL:  no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL offMar 23 15:22:49 xds-data1-temp postgres[13082]: [3-1] user=,db=,app=client= FATAL:  could not connect to the primary server: FATAL:  no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL offMar 23 15:22:49 xds-data1-temp postgres[13082]: [3-2]Mar 23 15:22:49 xds-data1-temp postgres[13085]: [3-1] user=[unknown],db=[unknown],app=[unknown]client=[local] LOG:  connection received: host=[local]Mar 23 15:22:49 xds-data1-temp postgres[13085]: [4-1] user=postgres,db=[unknown],app=[unknown]client=[local] FATAL:  no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL offMar 23 15:22:49 xds-data1-temp postgres[13084]: [3-1] user=,db=,app=client= FATAL:  could not connect to the primary server: FATAL:  no pg_hba.conf entry for replication connection from host "[local]", user "postgres", SSL off
We know that the entry is in the hba and have checked for typos, but one thing that does stick out with one line on the message is; 
    FATAL:  no pg_hba.conf entry for replication connection from host "[local]" 
Other messages I have seen in the past would normally have an IP address where is says "[local]"
Any ideas as to where we might be going wrong?    

Many thanks




Doug Reed dougreed765@yahoo.com 07973-132664https://uk.linkedin.com/pub/douglas-reed/33/326/2b

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem with replication
  2020-03-23 18:30 Problem with replication Douglas Reed <dougreed765@yahoo.com>
@ 2020-03-23 18:33 ` Holger Jakobs <holger@jakobs.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Holger Jakobs @ 2020-03-23 18:33 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Hi Douglas,

the connection attempt has obviously been started via a "local" 
connection, using a Unix socket instead of TCP/IP. Therefore, no IP 
address is involved.

Is the slave db on the same machine?

Regards,

Holger

Am 23.03.20 um 19:30 schrieb Douglas Reed:
> Hi
>
> We are running Pg Version 9.6
>
> On OS Centos 7 running on a VM (Nutanix)
>
> We are trying to build a slave server on this platform. The relevant 
> IP entry for replication has been placed in pg_hba.conf on the master. 
> We run pg_basebackup successfully and then set up recovery.conf etc 
> and re-start
> the slave database. It seems to process the WALs and then enter the 
> read only state when it then generates the following errors;
>
> Mar 23 15:22:48 xds-data1-temp postgres[13072]: [2-1] 
> user=,db=,app=client= LOG:  database system is ready to accept read 
> only connections
> Mar 23 15:22:49 xds-data1-temp postgres[13083]: [3-1] 
> user=[unknown],db=[unknown],app=[unknown]client=[local] LOG:  
> connection received: host=[local]
> Mar 23 15:22:49 xds-data1-temp postgres[13083]: [4-1] 
> user=postgres,db=[unknown],app=[unknown]client=[local] FATAL:  no 
> pg_hba.conf entry for replication connection from host "[local]", user 
> "postgres", SSL off
> Mar 23 15:22:49 xds-data1-temp postgres[13082]: [3-1] 
> user=,db=,app=client= FATAL:  could not connect to the primary server: 
> FATAL:  no pg_hba.conf entry for replication connection from host 
> "[local]", user "postgres", SSL off
> Mar 23 15:22:49 xds-data1-temp postgres[13082]: [3-2]
> Mar 23 15:22:49 xds-data1-temp postgres[13085]: [3-1] 
> user=[unknown],db=[unknown],app=[unknown]client=[local] LOG:  
> connection received: host=[local]
> Mar 23 15:22:49 xds-data1-temp postgres[13085]: [4-1] 
> user=postgres,db=[unknown],app=[unknown]client=[local] FATAL:  no 
> pg_hba.conf entry for replication connection from host "[local]", user 
> "postgres", SSL off
> Mar 23 15:22:49 xds-data1-temp postgres[13084]: [3-1] 
> user=,db=,app=client= FATAL:  could not connect to the primary server: 
> FATAL:  no pg_hba.conf entry for replication connection from host 
> "[local]", user "postgres", SSL off
>
> We know that the entry is in the hba and have checked for typos, but 
> one thing that does stick out with one line on the message is;
>
>     FATAL:  no pg_hba.conf entry for replication connection from host 
> "[local]"
>
> Other messages I have seen in the past would normally have an IP 
> address where is says "[local]"
>
> Any ideas as to where we might be going wrong?
>
>
> Many thanks
>
>
>
>
>
> Doug Reed
> dougreed765@yahoo.com
> 07973-132664
> https://uk.linkedin.com/pub/douglas-reed/33/326/2b

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem with replication
  2020-03-23 18:30 Problem with replication Douglas Reed <dougreed765@yahoo.com>
@ 2020-03-23 19:27 ` Loai Abdallatif <loai.abdallatif@gmail.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Loai Abdallatif @ 2020-03-23 19:27 UTC (permalink / raw)
  To: Tan, Mein Sin <MeinSin.Tan@opitz-consulting.com>; +Cc: Douglas Reed <dougreed765@yahoo.com>; pgsql-admin; Matthew Couper <mcouper@fsbtech.com>; Andrew Jobson <andrew@fsbtech.com>

I think the problem related pg_hba.conf file on slave, try to get copy from
backup if exist or somewhere else

On Mon, Mar 23, 2020 at 9:20 PM Tan, Mein Sin <
MeinSin.Tan@opitz-consulting.com> wrote:

> Hello Douglas,
>
>
>
> Take a look at the pg_hba.conf on the Replication DB.
>
>
>
> Best regards,
>
> Mein Sin
>
>
>
>
>
> *Von:* Douglas Reed <dougreed765@yahoo.com>
> *Gesendet:* Montag, 23. März 2020 19:31
> *An:* pgsql-admin@postgresql.org
> *Cc:* Matthew Couper <mcouper@fsbtech.com>; Andrew Jobson <
> andrew@fsbtech.com>
> *Betreff:* Problem with replication
>
>
>
> Hi
>
>
>
> We are running Pg Version 9.6
>
>
>
> On OS Centos 7 running on a VM (Nutanix)
>
>
>
> We are trying to build a slave server on this platform. The relevant IP
> entry for replication has been placed in pg_hba.conf on the master. We run
> pg_basebackup successfully and then set up recovery.conf etc and re-start
>
> the slave database. It seems to process the WALs and then enter the read
> only state when it then generates the following errors;
>
>
>
> Mar 23 15:22:48 xds-data1-temp postgres[13072]: [2-1]
> user=,db=,app=client= LOG:  database system is ready to accept read only
> connections
>
> Mar 23 15:22:49 xds-data1-temp postgres[13083]: [3-1]
> user=[unknown],db=[unknown],app=[unknown]client=[local] LOG:  connection
> received: host=[local]
>
> Mar 23 15:22:49 xds-data1-temp postgres[13083]: [4-1]
> user=postgres,db=[unknown],app=[unknown]client=[local] FATAL:  no
> pg_hba.conf entry for replication connection from host "[local]", user
> "postgres", SSL off
>
> Mar 23 15:22:49 xds-data1-temp postgres[13082]: [3-1]
> user=,db=,app=client= FATAL:  could not connect to the primary server:
> FATAL:  no pg_hba.conf entry for replication connection from host
> "[local]", user "postgres", SSL off
>
> Mar 23 15:22:49 xds-data1-temp postgres[13082]: [3-2]
>
> Mar 23 15:22:49 xds-data1-temp postgres[13085]: [3-1]
> user=[unknown],db=[unknown],app=[unknown]client=[local] LOG:  connection
> received: host=[local]
>
> Mar 23 15:22:49 xds-data1-temp postgres[13085]: [4-1]
> user=postgres,db=[unknown],app=[unknown]client=[local] FATAL:  no
> pg_hba.conf entry for replication connection from host "[local]", user
> "postgres", SSL off
>
> Mar 23 15:22:49 xds-data1-temp postgres[13084]: [3-1]
> user=,db=,app=client= FATAL:  could not connect to the primary server:
> FATAL:  no pg_hba.conf entry for replication connection from host
> "[local]", user "postgres", SSL off
>
>
>
> We know that the entry is in the hba and have checked for typos, but one
> thing that does stick out with one line on the message is;
>
>
>
>     FATAL:  no pg_hba.conf entry for replication connection from host
> "[local]"
>
>
>
> Other messages I have seen in the past would normally have an IP address
> where is says "[local]"
>
>
>
> Any ideas as to where we might be going wrong?
>
>
>
>
>
> Many thanks
>
>
>
>
>
>
>
>
>
>
>
> Doug Reed
>
> dougreed765@yahoo.com
>
> 07973-132664
>
> https://uk.linkedin.com/pub/douglas-reed/33/326/2b
>


-- 
Best Regards,

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Problem with replication
@ 2020-03-23 19:04 Douglas Reed <dougreed765@yahoo.com>
  2020-03-23 19:37 ` Re: Problem with replication Holger Jakobs <holger@jakobs.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Douglas Reed @ 2020-03-23 19:04 UTC (permalink / raw)
  To: pgsql-admin

Hi
The master is on a different machine
Regards
Doug Reed dougreed765@yahoo.com 07973-132664https://uk.linkedin.com/pub/douglas-reed/33/326/2b

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem with replication
  2020-03-23 19:04 Problem with replication Douglas Reed <dougreed765@yahoo.com>
@ 2020-03-23 19:37 ` Holger Jakobs <holger@jakobs.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Holger Jakobs @ 2020-03-23 19:37 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

But the refused connection attempt was to [local] (not from a different 
machine) and it has reached a server, which rejected it due to lack of a 
matching entry in pg_hba.conf


Am 23.03.20 um 20:04 schrieb Douglas Reed:
> Hi
>
> The master is on a different machine
>
> Regards
>
> Doug Reed
> dougreed765@yahoo.com
> 07973-132664
> https://uk.linkedin.com/pub/douglas-reed/33/326/2b

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Problem with replication
@ 2020-03-24 16:24 Douglas Reed <dougreed765@yahoo.com>
  2020-03-24 19:09 ` Re: Problem with replication Loai Abdallatif <loai.abdallatif@gmail.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Douglas Reed @ 2020-03-24 16:24 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Matthew Couper <mcouper@fsbtech.com>; Andrew Jobson <andrew@fsbtech.com>

Hi again
Incident resolution - FYI

The cause of this issue was that there was a missing part of the recovery.conf file which read;
primary_conninfo = 'nnn.nn.nn.nnn'

It should have read;
primary_conninfo = 'host=nnn.nn.nn.nnn'


Where nnn.nn.nn.nnn is the master servers IP address

Many thanks


Doug Reed dougreed765@yahoo.com 07973-132664https://uk.linkedin.com/pub/douglas-reed/33/326/2b

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Problem with replication
  2020-03-24 16:24 Problem with replication Douglas Reed <dougreed765@yahoo.com>
@ 2020-03-24 19:09 ` Loai Abdallatif <loai.abdallatif@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Loai Abdallatif @ 2020-03-24 19:09 UTC (permalink / raw)
  To: Douglas Reed <dougreed765@yahoo.com>; +Cc: pgsql-admin; Matthew Couper <mcouper@fsbtech.com>; Andrew Jobson <andrew@fsbtech.com>

excellent

On Tue, Mar 24, 2020 at 6:24 PM Douglas Reed <dougreed765@yahoo.com> wrote:

> Hi again
>
> Incident resolution - FYI
>
> The cause of this issue was that there was a missing part of the
> recovery.conf file which read;
>
> primary_conninfo = 'nnn.nn.nn.nnn'
>
> It should have read;
>
> primary_conninfo = 'host=nnn.nn.nn.nnn'
>
>
> Where nnn.nn.nn.nnn is the master servers IP address
>
>
> Many thanks
>
>
>
> Doug Reed
> dougreed765@yahoo.com
> 07973-132664
> https://uk.linkedin.com/pub/douglas-reed/33/326/2b
>


-- 
Best Regards,

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-03-24 19:09 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 18:30 Problem with replication Douglas Reed <dougreed765@yahoo.com>
2020-03-23 18:33 ` Holger Jakobs <holger@jakobs.com>
2020-03-23 19:27 ` Loai Abdallatif <loai.abdallatif@gmail.com>
2020-03-23 19:04 Problem with replication Douglas Reed <dougreed765@yahoo.com>
2020-03-23 19:37 ` Holger Jakobs <holger@jakobs.com>
2020-03-24 16:24 Problem with replication Douglas Reed <dougreed765@yahoo.com>
2020-03-24 19:09 ` Loai Abdallatif <loai.abdallatif@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox