2

Please help me to figure it out, help is much appreciated!

ERROR:

FATAL:  no pg_hba.conf entry for replication connection from host "172.18.0.4", user "repmgr", SSL on

The following is a list of my pg_hba entries:enter image description here

The following is the query output from pg_hba_file_rules:

line_number | type  |   database    | user_name  |  address   |                 netmask                 | auth_method | options | error
------------+-------+---------------+------------+------------+-----------------------------------------+-------------+---------+-------
      85 | local | {all}         | {postgres} |            |                                         | peer        |         |
      90 | local | {all}         | {all}      |            |                                         | peer        |         |
      92 | host  | {all}         | {all}      | 127.0.0.1  | 255.255.255.255                         | md5         |         |
      94 | host  | {all}         | {all}      | ::1        | ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | md5         |         |
      97 | local | {replication} | {all}      |            |                                         | peer        |         |
      98 | host  | {replication} | {all}      | 127.0.0.1  | 255.255.255.255                         | md5         |         |
      99 | host  | {replication} | {all}      | ::1        | ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | md5         |         |
     101 | host  | {all}         | {repmgr}   | 172.18.0.0 | 255.255.255.0                           | trust       |         |
     102 | host  | {replication} | {repmgr}   | 172.18.0.0 | 255.255.255.0                           | trust       |         |

As you can see, the pg_hba.conf did get loaded to the database. Where did I do wrong?

CJ Chang
  • 295
  • 2
  • 4
  • 12

1 Answers1

-1

Finally got it working!!!

Since the pg_hba.conf records are examined sequentially for each connection attempt, the order of the records is significant. Typically, earlier records will have tight connection match parameters and weaker authentication methods, while later records will have looser match parameters and stronger authentication methods.

CJ Chang
  • 295
  • 2
  • 4
  • 12