Search Postgresql Archives

Re: no pg_hba.conf entry for replication connection from host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/09/2015 12:39 PM, Volkan Unsal wrote:
Hi Melvin,

When I make this entry

    host    replication     rep 104.131.66.183/32
    <http://104.131.66.183/32>            md5


It complains that it cannot have both CIDR and mask number and fails to
start –– I assume it's referring to /32 –– and when I remove that it
starts alright, but it doesn't accept replication connections from that
IP address.

The above looks alright, I would expect the complaint if you did something like this:

host  replication  rep 104.131.66.183/32  255.255.255.255   md5


(Also I changed REP_USER to "replication" in latest examples, but it's
consistent in both master and slave.)

The other variables where changed also?


| Did you remember to do: SELECT pg_reload_conf();

Yes, in a manner of speaking. The database is in a Docker container, so
I'm recreating the container everytime I change something in the
configuration. :)


Hmm, that is another variable in the mix. So more information is in order.

1) What version(s) of Postgres are you using on either end?

2) Are the primary and the standby in different containers?

3) What is the container/machine/network layout?





On Thu, Apr 9, 2015 at 3:20 PM, Melvin Davidson <melvin6925@xxxxxxxxx
<mailto:melvin6925@xxxxxxxxx>> wrote:

    So did you make the following entry in pg_hba,conf?

    host    replication     rep 104.131.66.183/32
    <http://104.131.66.183/32>            md5

    Is rep a valid postgres user in the cluster?

    Did you remember to do:
    SELECT pg_reload_conf();

    After making the changes to pg_hba.conf?


    On 4/9/15, Volkan Unsal <spocksplanet@xxxxxxxxx
    <mailto:spocksplanet@xxxxxxxxx>> wrote:
    > HI Adrian,
    >
    >
    >
    >> Can you connect remotely from the standby using psql?
    >
    >
    >
    > Yes, I can connect directly from the standby using psql and DB_USER and
    > DB_PASS.
    >
    >
    >
    >
    > --
     > *Volkan Unsal*
     > *web and mobile development*
     > volkanunsal.com <http://volkanunsal.com> <http://bit.ly/1h1ebjy>
     >


    --
    *Melvin Davidson*
    I reserve the right to fantasize.  Whether or not you
    wish to share my fantasy is entirely up to you.




--
*Volkan Unsal*
/web and mobile development/
volkanunsal.com <http://bit.ly/1h1ebjy>


--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux