[Bucardo-general] (no subject)

Hans van der Riet hans at electude.nl
Mon Nov 17 21:40:19 UTC 2014


On 17-11-14 09:08, Hadri Rahman wrote:
> So I've installed Bucardo onto my system, but whenever I try to perform
> a sync or running it in general, I would get the error message:
>
> DBI connect('dbname=bucardo;host=localhost;port5432', 'bucardo',...)
> failed: FATAL: password authentication failed for user "bucardo"
> FATAL: password authentication failed for user "bucardo" at
> /usr/local/bin/bucardo line 296

You configured Bucardo to connect to PostgreSQL over TCP/IP. TCP/IP 
connections are configured in pg_hba.conf using the 'host' connection 
type. Your pg_hba.conf has no entry to match your Bucardo connection.

> #IPv4
> local     all        all 127.0.0.1/32 <http://127.0.0.1/32>         md5
> #IPv6
> local     all        all     ::1/128         peer

These lines do nothing, since local connections are already handled by 
the second entry in your file. For TCP/IP connections you should use:

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

Note that you can only use the peer method on local connections, so for 
IPv6 you should use something different like md5.

> #Allow replication connections from localhost:
> host     replication rep 192.168.0.111/32 <http://192.168.0.111/32>     md5
> local    bucardo     bucardo                      md5

This last line is intended when Bucardo uses a Unix domain socket (if 
you set 'no host' when you install Bucardo). You can remove it when you 
use TCP/IP.
Note that to make a local connection work, you should put this line 
above the 'local all all peer' line, otherwise peer authentication will 
be used (and will fail). PostgreSQL looks from top to bottom for the 
first matching entry in pg_hba.conf. Probably you also want Bucardo to 
connect to other database(s) as well, something like this:

local   all             postgres                                peer
local   all             bucardo                                 md5
local   all             all                                     peer


Kind regards,
-- 
Hans van der Riet


More information about the Bucardo-general mailing list