-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname='postgres' port=5432 user='sa'': connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: fe_sendauth: no password supplied #2068
Comments
Hi,
That's a replication connection and using the host ip. You need to allow the unix socket connection and access to the normal db, not restricting to replication. Also, if you want to avoid Kind Regards |
Hello, Thank you for your quick answer, yes I decided to use a PGPASSFILL which is declared as an environment variable here : -> env |
The pg_hba entry should look like The underlying issue here is that you try to use the host based connection but pgBackRest is using the unix socket. To be honest, I never tried to change the default pgpass location when using pgBackRest but imho, I think the environment variable should be PGPASSFILE not FILE_PGPASS. |
Ok so I do the modification for environnement variable : And for pg_hba.conf : TYPE DATABASE USER CIDR-ADDRESS METHODlocal all all scram-sha-256 Streaminghost replication "sa" 10.34.251.75/32 password # pg_basebackup But : |
And what's in |
In we have /etc/postgres/pgpass-PGOTVMI625S1 :
When I place it in the default location in pgpass.conf with the same ==>
|
What do you mean? Where did you placed it? It should be |
Oh I place it on /etc/postgres, so I replace it on ~/.pgpass and I exportat the good path on the pgpassfile env as you can see with the same information as before :
|
As stated in PG docs, the file should be named
|
I thank you for your patience. The pgbackrest command is functional and I was able to create my stanza. Thx a lot <3 |
Just to follow up, the PGPASSFILE environment variable should work too, if configured properly. I just tested the following situation: $ cat 15/data/pg_hba.conf
local all stefan scram-sha-256
$ psql -U stefan -d postgres
Password for user stefan:
$ pgbackrest --stanza=demo stanza-create
WARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname='postgres' port=5432 user='stefan'': connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: fe_sendauth: no password supplied
ERROR: [056]: unable to find primary cluster - cannot proceed
HINT: are all available clusters in recovery? Then I added the $ PGPASSFILE=/etc/.pgpass psql -U stefan -d postgres -c "select now();"
now
-------------------------------
2023-05-16 11:40:49.323321+00
(1 row)
$ PGPASSFILE=/etc/.pgpass pgbackrest --stanza=demo stanza-create
...
P00 INFO: stanza-create command end: completed successfully |
Please provide the following information when submitting an issue (feature requests or general comments can skip this):
pgBackRest version:
==> pgBackRest 2.45
PostgreSQL version:
==> postgres (PostgreSQL) 15.2
Operating system/version - if you have more than one server (for example, a database server, a repository host server, one or more standbys), please specify each:
==> Red Hat Enterprise Linux release 8.7 (Ootpa)
Did you install pgBackRest from source or from a package?
From ==> https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
Please attach the following as applicable:
pgbackrest.conf
file(s)postgresql.conf
settings applicable to pgBackRest (archive_command
,archive_mode
,listen_addresses
,max_wal_senders
,wal_level
,port
)/var/log/pgbackrest
for the commands run (e.g./var/log/pgbackrest/mystanza_backup.log
)pgbacrest.conf.txt
pgbackrest --config=/etc/pgbackrest.conf --log-level-console=info --stanza=prod_backup stanza-create
2023-05-16 09:07:02.489 P00 INFO: stanza-create command begin 2.45: --config=/etc/pgbackrest.conf --exec-id=63528-b9174227 --log-level-console=info --log-level-file=debug --pg1-path=/DATABASE/PGDATA/PGOTVMI625S1/DATA/ --pg1-user=sa --repo1-path=/DATABASE/PGSAVE/PGOTVMI625S1/pgbackrest --stanza=prod_backup
WARN: unable to check pg1: [DbConnectError] unable to connect to 'dbname='postgres' port=5432 user='sa'': connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: fe_sendauth: no password supplied
ERROR: [056]: unable to find primary cluster - cannot proceed
HINT: are all available clusters in recovery?
2023-05-16 09:07:02.493 P00 INFO: stanza-create command end: aborted with exception [056]
Describe the issue:
When I try to create my Stanza I am told that no password is presented, I decided to put my user in trust in the pg_hba.conf file and the same thing does not work either is that someone Any idea how to fix the problem ?
resume pg_hba.conf
"[.....]# Streaming
host replication sa 10.34.251.75/32 trust"
postgres.conf.txt
The text was updated successfully, but these errors were encountered: