[Bucardo-general] Peer authentication error preventing herd creation

David Christensen david at endpoint.com
Mon Jul 27 22:12:05 UTC 2015

Hi Alex,

> MD5 doesn’t seem to be working.  I set the pg_hba line to end with ‘md5' instead of ‘peer’, and added another line for the host ‘localhost’, but I get the same FATAL message from Bucardo.  Running ‘su` to be the bucardo user and then running ‘psql’, flagless, runs psql without a hitch, and 'CREATE DATABASE foo;’ worked.

Not sure if you figured this out, but here’s a few more tips:

There are actually a couple database clusters potentially at play here; the Bucardo database and any of the involved databases in the cluster.  Are you changing the correct pg_hba.conf file?

If this message is appearing when you’re running the `bucardo` program, it’s likely related to the cluster where the “bucardo” database lives.  You may might also verify the permissions of the .pgpass file.


>    me at vm:~$ psql -U bucardo --password
>    Password for user bucardo:         #pasted scrubbed_string
>    psql: FATAL:  Peer authentication failed for user "bucardo"


>    local   all             all                                     peer
>    # IPv4 local connections:
>    host    all             all               md5

This is probably your problem here; by not specifying a hostname it defaults to local socket, so will fall back to the “peer” method here.  Either set local connection auth method to “md5” and use .pgpass files or set “local” to “trust”.


David Christensen
PostgreSQL Team Manager
End Point Corporation
david at endpoint.com

More information about the Bucardo-general mailing list