Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sjJMK-00HCVJ-QO for pgsql-general@arkaria.postgresql.org; Wed, 28 Aug 2024 14:09:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sjJMI-005fvq-Ia for pgsql-general@arkaria.postgresql.org; Wed, 28 Aug 2024 14:09:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sjJMI-005fvi-3m for pgsql-general@lists.postgresql.org; Wed, 28 Aug 2024 14:09:14 +0000 Received: from mail-yw1-x1132.google.com ([2607:f8b0:4864:20::1132]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sjJME-001vlA-G1 for pgsql-general@postgresql.org; Wed, 28 Aug 2024 14:09:14 +0000 Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-6b3afc6cd01so5404347b3.1 for ; Wed, 28 Aug 2024 07:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724854150; x=1725458950; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=wvBw/j/y+qcyZ8jCWJjCPL5TwqtCpLj86/UhAxGEFOU=; b=Kco/FDGKfD6ic6Z716j8TAhLG04AhN+2ZGRNs463CwI9A/nJ7pdxkNIYrkicPDtvos /HDyNqfrUUT8KNjp75uR6y3StNsAD6krhUJ9lYnr9QA1axjjUWlJXKRyaM9JiFcqcIMc 7ut2oz9RkwnSTsxLYCpUc/hxMN8IRvbOGRWGM+4kGeQuuT+Wbp+/DqpmZt0y3b2DJxo7 eN90P6Kkl84Ksy10WP8Of3lmy9e3ROuwRYR32IzSEOBbvExVFH5TUENItY24A5zuzPxJ ExFyziMimiYFXDUTiBvTNmqEVCu+9Ft8XKrnQrNooyWWDM1PCA1225EGMglBcYiw2+Jb rgXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724854150; x=1725458950; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wvBw/j/y+qcyZ8jCWJjCPL5TwqtCpLj86/UhAxGEFOU=; b=REkSRfaCEyN4q0lWiv47VIJPeiy2fXi31FmPvUuN1FGInQmMYIwQ2JUlrehE/ghV4P HeEh6GtHrcnFaYdoOoaQsDfnrto/e5DbsXdJdvU/Y4AXZr9nuzS4PpxiucUwjES9nZEN guneklIW/zkpnKlxAOmC8cRyJzXnE4+Zb6OIth5khr1L1V3k5Dyn2uuFtfZw1NE1SWqi IgZ9DhvMxfNmwz4YYIDMv4GOVEQ9IRCRPS06wbe2sgvdNDxBDyvEFpw+5DC0ejO0zrLo Gtzw0H0DIDKDOcSR5Qcgv0PYKKnxXc05MfSxz3TbuuFcd5JpaLrTrE5dpVgxAMESmwv1 1htw== X-Gm-Message-State: AOJu0YyWCjwosLQjKf9Xu2aQBnRu6enNfNjJIxoTftbl3IFC78gswanj WyiPbekQYKpXQZyH6js9unSmdktoodNaQx6ZqwJvmHYG7vRB1b4iGA0cwYs+XbdLyNM3lEaNQEj U/bYJDt0q77iTS0KhKVfIXY6+aAHhmSjG X-Google-Smtp-Source: AGHT+IFBSxGSbV3x4c6IZ5JGVWfQXsohnnvh3SRqhWBs9ewwYELvuzyEPS1ze3xdk+LdKLaepvC3RDutp0/LyrslOBQ= X-Received: by 2002:a05:690c:668e:b0:664:74cd:5548 with SMTP id 00721157ae682-6d15177e4efmr17925817b3.1.1724854149652; Wed, 28 Aug 2024 07:09:09 -0700 (PDT) MIME-Version: 1.0 From: KK CHN Date: Wed, 28 Aug 2024 19:39:18 +0530 Message-ID: Subject: PgbackRest : Stanza creation fails on DB Server and Repo Server To: pgsql-general Content-Type: multipart/alternative; boundary="000000000000e12d7a0620bee6f6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e12d7a0620bee6f6 Content-Type: text/plain; charset="UTF-8" I am trying pgbackrest config on a Production Server and a Repo server ( RHEL 9.4 EPAS 16 , pgbackrest 2.52.1 I have configured pbbackrest.conf on both machines as per the official docs. From b*oth machines password less auth works for the db user *(enterprisedb ) and repouser(postgres) . When I create the stanza on both the DB server and Repo server it fails with connection to server socket failed no password supplied.. ################################################################################ Here my configs on both primary and repo server. DB Server. [root@db1 ~]# cat /etc/pgbackrest/pgbackrest.conf [Repo] pg1-path=/data/edb/as16/data pg1-port=5444 pg1-user=enterprisedb pg-version-force=16 pg1-database=edb [global] repo1-host=10.255.0.40 repo1-host-user=postgres archive-async=y spool-path=/var/spool/pgbackrest log-level-console=info log-level-file=debug delta=y [global:archive-get] process-max=2 [global:archive-push] process-max=4 [root@db1 ~]# Reposerver [root@dbtest ~]# cat /etc/pgbackrest/pgbackrest.conf [Repo] pg1-host=10.15.0.202 pg1-host-user=enterprisedb pg1-path=/data/edb/as16/data pg-version-force=16 [global] repo1-path=/data/DB_BKUPS repo1-block=y repo1-bundle=y repo1-retention-full=2 repo1-retention-diff=2 repo1-cipher-type=aes-256-cbc repo1-cipher-pass=acbd process-max=5 log-level-console=info log-level-file=debug start-fast=y delta=y [global:archive-push] compress-level=3 [root@dbtest ~]# *On DB Server stanza creation fails with * valid_lft forever preferred_lft forever [root@db1 ~]# sudo -u enterprisedb pgbackrest --stanza=Repo --log-level-console=info stanza-create 2024-08-28 19:30:31.518 P00 INFO: stanza-create command begin 2.52.1: --exec-id=4062179-ecf39176 --log-level-console=info --log-level-file=debug --pg1-database=edb --pg1-path=/data/edb/as16/data --pg1-port=5444 --pg1-user=enterprisedb --pg-version-force=16 --repo1-host=10.255.0.40 --repo1-host-user=postgres --stanza=Repo *WARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname='edb' port=5444 user='enterprisedb'': connection to server on socket "/tmp/.s.PGSQL.5444" failed: fe_sendauth: no password supplied* ERROR: [056]: unable to find primary cluster - cannot proceed HINT: are all available clusters in recovery? 2024-08-28 19:30:31.523 P00 INFO: stanza-create command end: aborted with exception [056] [root@db1 ~]# *On Repo server: stanza creation fails with follows. * [root@dbtest ~]# sudo -u postgres pgbackrest --stanza=Repo --log-level-console=info stanza-create 2024-08-28 19:21:10.958 P00 INFO: stanza-create command begin 2.52.1: --exec-id=350565-6e032daa --log-level-console=info --log-level-file=debug --pg1-host=10.15.0.202 --pg1-host-user=enterprisedb --pg1-path=/data/edb/as16/data --pg-version-force=16 --repo1-cipher-pass= --repo1-cipher-type=aes-256-cbc --repo1-path=/data/DB_BKUPS --stanza=Repo *WARN: unable to check pg1: [DbConnectError] raised from remote-0 ssh protocol on '10.15.0.202': unable to connect to 'dbname='edb' port=5444 user='enterprisedb'': connection to server on socket "/tmp/.s.PGSQL.5444" failed: fe_sendauth: no password suppliedERROR: [056]: unable to find primary cluster - cannot proceed* HINT: are all available clusters in recovery? 2024-08-28 19:21:12.462 P00 INFO: stanza-create command end: aborted with exception [056] [root@dbtest ~]# My DB Server pg_hba.conf as follows # "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 10.0.0.0/8 md5 # IPv6 local connections: host all all ::1/128 md5 # Allow replication connections from localhost, by a user with the # replication privilege. local replication all md5 host replication all 127.0.0.1/32 md5 host replication all ::1/128 md5 host replication all 10.0.0.0/8 md5 [root@db1 ~]# and I have .pgpass in DB server as [root@db1 ~]# cat /var/lib/edb/.pgpass *:*:replication:enterprisedb:my_secret_password [root@db1 ~]# ls -al /var/lib/edb/.pgpass -rw-------. 1 enterprisedb enterprisedb 38 Aug 28 19:01 /var/lib/edb/.pgpass [root@db1 ~]# WHy it complains about no password supplied.. Any help is much appreciated. Krishane --000000000000e12d7a0620bee6f6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am trying=C2=A0 pgbackrest config=C2=A0 on a Production = Server and a Repo server ( RHEL 9.4=C2=A0 EPAS 16 , pgbackrest 2.52.1
<= br>
I have configured=C2=A0 =C2=A0pbbackrest.conf=C2=A0on both ma= chines=C2=A0 as per the official docs.

From bot= h machines password=C2=A0less auth works for the db user (enterprisedb = ) and repouser(postgres)=C2=A0

.=C2=A0
<= br>
When I create the stanza on both the=C2=A0 DB server and Repo= server it fails with=C2=A0

connection to server s= ocket failed=C2=A0 no password supplied..

########= ########################################################################
Here my configs on both primary and repo server.

DB Server.=C2=A0
[root@db1 ~]# cat /etc/pgbackrest/pgbackr= est.conf
[Repo]
pg1-path=3D/data/edb/as16/data
pg1-port=3D5444
= pg1-user=3Denterprisedb
pg-version-force=3D16
pg1-database=3Dedb
<= br>[global]
repo1-host=3D10.255.0.40
repo1-host-user=3Dpostgres
ar= chive-async=3Dy
spool-path=3D/var/spool/pgbackrest
log-level-console= =3Dinfo
log-level-file=3Ddebug
delta=3Dy

[global:archive-get]<= br>process-max=3D2

[global:archive-push]
process-max=3D4
[root= @db1 ~]#





Reposerver=C2=A0
[root@dbtest ~]# cat /etc= /pgbackrest/pgbackrest.conf
[Repo]
pg1-host=3D10.15.0.202
pg1-host= -user=3Denterprisedb
pg1-path=3D/data/edb/as16/data
pg-version-force= =3D16

[global]
repo1-path=3D/data/DB_BKUPS
repo1-block=3Dy
= repo1-bundle=3Dy
repo1-retention-full=3D2
repo1-retention-diff=3D2repo1-cipher-type=3Daes-256-cbc
repo1-cipher-pass=3Dacbd
process-max= =3D5
log-level-console=3Dinfo
log-level-file=3Ddebug
start-fast=3D= y
delta=3Dy

[global:archive-push]
compress-level=3D3
[root@= dbtest ~]#



On= DB Server stanza creation fails with=C2=A0=C2=A0
=C2=A0 =C2= =A0 =C2=A0 =C2=A0valid_lft forever preferred_lft forever
[root@db1 ~]# s= udo -u enterprisedb pgbackrest --stanza=3DRepo --log-level-console=3Dinfo s= tanza-create
2024-08-28 19:30:31.518 P00 =C2=A0 INFO: stanza-create comm= and begin 2.52.1: --exec-id=3D4062179-ecf39176 --log-level-console=3Dinfo -= -log-level-file=3Ddebug --pg1-database=3Dedb --pg1-path=3D/data/edb/as16/da= ta --pg1-port=3D5444 --pg1-user=3Denterprisedb --pg-version-force=3D16 --re= po1-host=3D10.255.0.40 --repo1-host-user=3Dpostgres --stanza=3DRepo
W= ARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname= =3D'edb' port=3D5444 user=3D'enterprisedb'': connection= to server on socket "/tmp/.s.PGSQL.5444" failed: fe_sendauth: no= password supplied
ERROR: [056]: unable to find primary cluster - ca= nnot proceed
=C2=A0 =C2=A0 =C2=A0 =C2=A0HINT: are all available clusters= in recovery?
2024-08-28 19:30:31.523 P00 =C2=A0 INFO: stanza-create com= mand end: aborted with exception [056]
[root@db1 ~]#

<= /div>





<= /div>


On Repo server:=C2=A0 stanza cre= ation fails with follows.=C2=A0


[root@dbtest ~]# sudo -u postgres pgbackrest --stanza=3DRepo --log-level-c= onsole=3Dinfo stanza-create
2024-08-28 19:21:10.958 P00 =C2=A0 INFO: sta= nza-create command begin 2.52.1: --exec-id=3D350565-6e032daa --log-level-co= nsole=3Dinfo --log-level-file=3Ddebug --pg1-host=3D10.15.0.202 --pg1-host-u= ser=3Denterprisedb --pg1-path=3D/data/edb/as16/data --pg-version-force=3D16= --repo1-cipher-pass=3D<redacted> --repo1-cipher-type=3Daes-256-cbc -= -repo1-path=3D/data/DB_BKUPS --stanza=3DRepo
WARN: unable to check pg= 1: [DbConnectError] raised from remote-0 ssh protocol on '10.15.0.202&#= 39;: unable to connect to 'dbname=3D'edb' port=3D5444 user=3D&#= 39;enterprisedb'': connection to server on socket "/tmp/.s.PGS= QL.5444" failed: fe_sendauth: no password supplied
ERROR: [056]: un= able to find primary cluster - cannot proceed

=C2=A0 =C2=A0 =C2=A0 = =C2=A0HINT: are all available clusters in recovery?
2024-08-28 19:21:12.= 462 P00 =C2=A0 INFO: stanza-create command end: aborted with exception [056= ]
[root@dbtest ~]#=C2=A0 =C2=A0=C2=A0


<= /div>


My DB Server pg_hba.conf=C2=A0 as f= ollows


# "local" is for Unix domain = socket connections only
local =C2=A0 all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 md5
#= IPv4 local connections:
host =C2=A0 =C2=A0all =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0md5
host =C2=A0 =C2=A0all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 10.0.0.0/8 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0md5
=


# IPv6 local connections:
host =C2=A0 =C2=A0all =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ::1/128 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 md5
= # Allow replication connections from localhost, by a user with the
# rep= lication privilege.
local =C2=A0 replication =C2=A0 =C2=A0 all =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 md5
host =C2=A0 =C2=A0repl= ication =C2=A0 =C2=A0 all =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 127.0.0.1/32 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0md5
host =C2=A0 =C2=A0replication =C2=A0 =C2=A0 all =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ::1/128 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 md5
host =C2=A0 =C2=A0replication =C2=A0 =C2=A0 all= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 10= .0.0.0/8 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0md5
[root@d= b1 ~]#




and I have=C2=A0 =C2=A0.pgpass in DB server as=C2=A0

[root@db1 ~]# cat /var/lib/edb/.pgpass
*:*:replication:enterpri= sedb:my_secret_password
[root@db1 ~]# ls -al /var/lib/edb/.pgpass
-rw= -------. 1 enterprisedb enterprisedb 38 Aug 28 19:01 /var/lib/edb/.pgpass[root@db1 ~]#

WHy it complains about=C2=A0 n= o password supplied..=C2=A0


Any hel= p is much appreciated.=C2=A0

Krishane
--000000000000e12d7a0620bee6f6--