ERROR: Backup failed detecting data directory: fe_sendauth: no password supplied

2,436 views
Skip to first unread message

David Wagoner

unread,
Jan 20, 2015, 5:31:58 PM1/20/15
to pgba...@googlegroups.com
Hello,

I am setting up barman to backup a local postgres instance (barman and postgres on same server) and I'm getting the following errors in the barman log:

ERROR: Backup failed detecting data directory: fe_sendauth: no password supplied

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/barman/backup.py", line 264, in backup
    self.backup_start(backup_info)
  File "/usr/lib/python2.6/site-packages/barman/backup.py", line 796, in backup_start
    data_directory = self.server.get_pg_setting('data_directory')
  File "/usr/lib/python2.6/site-packages/barman/server.py", line 522, in get_pg_setting
    with self.pg_connect() as conn:
  File "/usr/lib64/python2.6/contextlib.py", line 16, in __enter__
    return self.gen.next()
  File "/usr/lib/python2.6/site-packages/barman/server.py", line 502, in pg_connect
    self.conn = psycopg2.connect(self.config.conninfo)
OperationalError: fe_sendauth: no password supplied

2015-01-20 17:08:50,293 [31697] barman.server WARNING: Error retrieving PostgreSQL status: fe_sendauth: no password supplied

I verified that bi-directional ssh works without password prompt using barman and postgres.  I also copied the .pgpass file from the postgres user's home to barman user's home and set file permissions.

Here is some additional information:

barman@srv:~#> barman check srv
Server srv:
        ssh: OK
        PostgreSQL: FAILED
        directories: OK
        retention policy settings: OK
        backup maximum age: OK (no last_backup_maximum_age provided)
        compression settings: OK
        minimum redundancy requirements: FAILED (have 0 backups, expected at least 2)


Any ideas?

Thank you,

David Wagoner

Gabriele Bartolini

unread,
Jan 20, 2015, 5:45:39 PM1/20/15
to pgba...@googlegroups.com
Hi David,

  could you please send us the output of the 'barman diagnose' command? Otherwise, please paste here ssh_command and conninfo parameters for that server.

  Version 1.4.0 has improved the output messages of that error, which should simply be a connection problem with the Postgres server (make sure you verify you are able to connect using psql too).

Cheers,
Gabriele

--
 Gabriele Bartolini - 2ndQuadrant Italia - Managing Director
 PostgreSQL Training, Services and Support
 gabriele....@2ndQuadrant.it | www.2ndQuadrant.it

--
--
You received this message because you are subscribed to the "Barman for PostgreSQL" group.
To post to this group, send email to pgba...@googlegroups.com
To unsubscribe from this group, send email to
pgbarman+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/pgbarman?hl=en?hl=en-GB

---
You received this message because you are subscribed to the Google Groups "Barman, Backup and Recovery Manager for PostgreSQL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pgbarman+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Wagoner

unread,
Jan 21, 2015, 1:10:33 PM1/21/15
to pgba...@googlegroups.com
Gabriele,

I installed barman 1.4.0-alpha.1, thank you for that suggestion.  I attempted another backup using this latest barman version and got the same password error, but note that barman was able to archive WAL files:

2015-01-21 11:45:52,239 [15455] barman.backup INFO: Starting backup for server myserver in /mnt/zfs/backup/barman/myserver/base/2015
0121T114552
2015-01-21 11:45:52,365 [15455] barman.backup ERROR: Backup failed issuing start backup command.
DETAILS: Cannot connect to postgres: fe_sendauth: no password supplied

2015-01-21 11:45:53,201 [15455] barman.backup INFO: Archiving myserver/00000001000016D800000084
2015-01-21 11:45:53,298 [15455] barman.backup INFO: Archiving myserver/00000001000016D8000000B4
...


barman@myserver:~#> barman diagnose
{
    "global": {
        "config": {
            "barman_home": "/mnt/zfs/backup/barman",
            "barman_user": "barman",
            "log_file": "/var/log/barman/barman.log"
        },
        "system_info": {
            "barman_ver": "1.4.0-alpha.1",
            "kernel_ver": "Linux myserver 2.6.32-358.23.2.el6.x86_64 #1 SMP Sat Sep 14 05:32:37 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux",
            "python_ver": "Python 2.6.6",
            "release": "LSB Version:\t:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch\nDistributor ID:\tRedHatEnterpriseServer\nDescription:\tRed Hat Enterprise Linux Server release 6.4 (Santiago)\nRelease:\t6.4\nCodename:\tSantiago",
            "rsync_ver": "rsync  version 3.0.6  protocol version 30",
            "ssh_ver": "OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010"
        }
    },
    "servers": {
        "myserver": {
            "backups": {
                "20150120T164533": {
                    "backup_id": "20150120T164533",
                    "backup_label": "None",
                    "begin_offset": null,
                    "begin_time": null,
                    "begin_wal": null,
                    "begin_xlog": null,
                    "config_file": null,
                    "deduplicated_size": null,
                    "end_offset": null,
                    "end_time": null,
                    "end_wal": null,
                    "end_xlog": null,
                    "error": "failure detecting data directory (fe_sendauth: no password supplied)",
                    "hba_file": null,
                    "ident_file": null,
                    "mode": "default",
                    "pgdata": null,
                    "server_name": "myserver",
                    "size": null,
                    "status": "FAILED",
                    "tablespaces": null,
                    "timeline": null,
                    "version": null
                },
                "20150120T165559": {
                    "backup_id": "20150120T165559",
                    "backup_label": "None",
                    "begin_offset": null,
                    "begin_time": null,
                    "begin_wal": null,
                    "begin_xlog": null,
                    "config_file": null,
                    "deduplicated_size": null,
                    "end_offset": null,
                    "end_time": null,
                    "end_wal": null,
                    "end_xlog": null,
                    "error": "failure detecting data directory (fe_sendauth: no password supplied)",
                    "hba_file": null,
                    "ident_file": null,
                    "mode": "default",
                    "pgdata": null,
                    "server_name": "myserver",
                    "size": null,
                    "status": "FAILED",
                    "tablespaces": null,
                    "timeline": null,
                    "version": null
                },
                "20150121T114552": {
                    "backup_id": "20150121T114552",
                    "backup_label": "None",
                    "begin_offset": null,
                    "begin_time": null,
                    "begin_wal": null,
                    "begin_xlog": null,
                    "config_file": null,
                    "deduplicated_size": null,
                    "end_offset": null,
                    "end_time": null,
                    "end_wal": null,
                    "end_xlog": null,
                    "error": "failure issuing start backup command (Cannot connect to postgres: fe_sendauth: no password supplied)",
                    "hba_file": null,
                    "ident_file": null,
                    "mode": "default",
                    "pgdata": null,
                    "server_name": "myserver",
                    "size": null,
                    "status": "FAILED",
                    "tablespaces": null,
                    "timeline": null,
                    "version": null
                }
            },
            "config": {
                "active": true,
                "backup_directory": "/mnt/zfs/backup/barman/myserver",
                "backup_options": "exclusive_backup",
                "bandwidth_limit": null,
                "barman_home": "/mnt/zfs/backup/barman",
                "basebackup_retry_sleep": 30,
                "basebackup_retry_times": 0,
                "basebackups_directory": "/mnt/zfs/backup/barman/myserver/base",
                "compression": null,
                "conninfo": "host=myserver port=5432 user=postgres",
                "custom_compression_filter": null,
                "custom_decompression_filter": null,
                "description": "PostgreSQL Database",
                "immediate_checkpoint": false,
                "incoming_wals_directory": "/mnt/zfs/backup/barman/myserver/incoming",
                "last_backup_maximum_age": null,
                "lock_file": "/mnt/zfs/backup/barman/myserver/myserver.lock",
                "minimum_redundancy": 2,
                "name": "myserver",
                "network_compression": false,
                "post_archive_script": null,
                "post_backup_script": null,
                "pre_archive_script": null,
                "pre_backup_script": null,
                "retention_policy": "window 4 w",
                "retention_policy_mode": "auto",
                "reuse_backup": null,
                "ssh_command": "ssh postgres@myserver",
                "tablespace_bandwidth_limit": null,
                "wal_retention_policy": "simple-wal 4 w",
                "wals_directory": "/mnt/zfs/backup/barman/myserver/wals"
            },
            "status": {
                "archive_command": null,
                "archive_mode": null,
                "current_xlog": null,
                "data_directory": null,
                "pgespremnt_installed": null,
                "server_txt_version": null
            },
            "system_info": {
                "kernel_ver": "Linux myserver 2.6.32-358.23.2.el6.x86_64 #1 SMP Sat Sep 14 05:32:37 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux",
                "python_ver": "Python 2.6.6",
                "release": "LSB Version:\t:base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch\nDistributor ID:\tRedHatEnterpriseServer\nDescription:\tRed Hat Enterprise Linux Server release 6.4 (Santiago)\nRelease:\t6.4\nCodename:\tSantiago",
                "rsync_ver": "rsync  version 3.0.6  protocol version 30",
                "ssh_ver": "OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010"
            }
        }
    }
}

David Wagoner

unread,
Jun 9, 2015, 3:43:29 PM6/9/15
to pgba...@googlegroups.com
The problem was that my barman env was pointing to the postgres user's pgpass file instead of the one I copied to the barman user's home.  It's all fixed now, thank you.
Reply all
Reply to author
Forward
0 new messages