EnterpriseDB / barman

Barman - Backup and Recovery Manager for PostgreSQL
https://www.pgbarman.org/
GNU General Public License v3.0
2.14k stars 193 forks source link

Barman Not Picking up .pgpass? #901

Closed nixonjoshua98 closed 9 months ago

nixonjoshua98 commented 9 months ago

Hi, following https://docs.pgbarman.org/release/3.10.0/ - I have two nodes on Hetzner. One running PG16 and one running barman.

barman receive-wal pg

ERROR: ArchiverFailure:failed opening the PostgreSQL streaming connection for server pg

Log file

2024-02-20 22:01:02,183 [1307] barman.server ERROR: ArchiverFailure:failed opening the PostgreSQL streaming connection for server pg 2024-02-20 22:02:01,347 [1363] barman.wal_archiver INFO: No xlog segments found from streaming for pg. 2024-02-20 22:02:01,358 [1364] barman.server INFO: Starting receive-wal for server pg 2024-02-20 22:02:01,362 [1364] barman.postgres WARNING: Error retrieving PostgreSQL status: connection to server at "", port 5432 failed: fe_sendauth: no password supplied 2024-02-20 22:02:01,362 [1364] barman.server ERROR: ArchiverFailure:failed opening the PostgreSQL streaming connection for server pg

root/.pgpass & /var/lib/barman/.pgpass both chmod 0600

*:*:*:barman:password *:*:*:streaming_barman:password

Works fine, gives me the expected output

psql -U streaming_barman -h ... -c "IDENTIFY_SYSTEM" replication=1

Works fine, gives me the expected output

psql -c 'SELECT version()' -U barman -h ... postgres

martinmarques commented 9 months ago

You need to look at the Postgres logs to see what's failing. There isn't enough information here to asist you.

nixonjoshua98 commented 9 months ago

What logs would I need to see? Postgres doesn't output anything after running the receive-wal command

nixonjoshua98 commented 9 months ago

I got it. needed to change who owned the file chown barman:barman .pgpass