After database upgrade in HA env postgres error generated FATAL: no pg_hba.conf entry for host "127.0.0.1", user "gitlab-consul", database "gitlab_repmgr"
Summary
PostgreSQL database has been upgraded manually in the multinode environment from version 9.6 to version 10.7 with the pg-upgrade
command. After a fairly bumpy upgrade it seems that eventually, we were able to successfully upgrade all the nodes in the setup below:
Distro RHEL 7
4 application nodes
3 database nodes - 1 master 2 slave
3 redis nodes - 1 master 2 slave ; consul and sentinel servers
However, postgreSQL log constantly generating below error:
2019-10-10_13:54:41.07446 FATAL: no pg_hba.conf entry for host "127.0.0.1", user "gitlab-consul", database "gitlab_repmgr", SSL off
2019-10-10_13:54:42.71433 FATAL: no pg_hba.conf entry for host "127.0.0.1", user "gitlab-consul", database "gitlab_repmgr", SSL on
pg_hba.conf file contents
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# repmgr
local replication gitlab_repmgr trust
host replication gitlab_repmgr 127.0.0.1/32 trust
host replication gitlab_repmgr 127.0.0.1/32 trust
host replication gitlab_repmgr 123.123.222.0/24 trust
local gitlab_repmgr gitlab_repmgr trust
host gitlab_repmgr gitlab_repmgr 127.0.0.1/32 trust
host gitlab_repmgr gitlab_repmgr 127.0.0.1/32 trust
host gitlab_repmgr gitlab_repmgr 123.123.222.0/24 trust
# "local" is for Unix domain socket connections only
local all all peer map=gitlab
host all all 123.123.222.0/24 trust
Details of package version
GitLab version 12.0.9
zd: https://gitlab.zendesk.com/agent/tickets/134426 (GitLab Internal Only)
Edited by Julius Kvedaras