[PG HA] Unable to authenticate
Once I got #2880 (closed) #2881 (closed) #2882 (closed) resolved, I was still not able to get the application to successfully auth with the database.
2017-10-17_12:13:11.11614 2017-10-17 12:13:11.116 16451 LOG C-0x2151630: gitlabhq_production/(nouser)@172.30.2.47:55716 closing because: pgbouncer cannot connect to server (age=0)
2017-10-17_12:13:11.11614 2017-10-17 12:13:11.116 16451 WARNING C-0x2151630: gitlabhq_production/(nouser)@172.30.2.47:55716 Pooler Error: pgbouncer cannot connect to server
I was not able to locally auth with pgbouncer:
/opt/gitlab/embedded/bin/psql -h 127.0.0.1 -p 6432 -d pgbouncer pgbouncer
Password for user pgbouncer:
psql: ERROR: Auth failed
I've checked that gitlab.rb has the values according to the docs:
pgbouncer['users'] = {
'gitlab-consul': {
password: 'HASH'
},
'pgbouncer': {
password: 'HASH'
}
}
and I've verified multiple times that the hash is correctly created from PASSWORDusername
pair and nothing made a difference.
Ultimately, I've disabled md5
because the machines were inside of the internal network:
pgbouncer['auth_type'] = 'trust'
and this finally allowed the cluster to connect.
/cc @ibaum