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

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Volkan Unsal <spocksplanet(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: no pg_hba.conf entry for replication connection from host
Date: 2015-04-09 19:39:44
Message-ID: 5526D580.3020401@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/09/2015 12:32 PM, Volkan Unsal wrote:
> Hi Adrian,
>
> I can confirm that the REP_USER is a role with replication attribute in
> the master
>
> Role name | Attributes | Member of
>
> -------------+------------------------------------------------+-----------
> postgres | Superuser, Create role, Create DB, Replication | {}
> replication | Replication +| {}
> | 4 connections |
>
> Also what file do you have primary_conninfo in?
>
>
>
> This setting is in ${PGDATA}/recovery.conf and looks like this:
>
> primary_conninfo = 'host=${MASTER_PORT_5432_TCP_ADDR} port=5432
> user=${REP_USER} password=${REP_PASS}'

Best guess is something is not working properly in turning the ${}
variables into actual values.

What happens if you do not use the variable notation and use the actual
values in the above string?

Also what do the standby server logs show while you are trying to connect?

>
>
>
>
> On Thu, Apr 9, 2015 at 3:16 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 04/09/2015 12:05 PM, Volkan Unsal 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.
>
>
> And you are sure the REP_USER is being correctly substituted in and
> that it has the REPLICATION attribute.
>
> Have you tried the primary_conninfo with the values directly entered?
>
> http://www.postgresql.org/__docs/9.4/interactive/sql-__createrole.html
> <http://www.postgresql.org/docs/9.4/interactive/sql-createrole.html>
>
> postgres(at)test=# create role rep_user with login replication;
> CREATE ROLE
>
> postgres(at)test=# \du rep_user
> List of roles
> Role name | Attributes | Member of
> -----------+-------------+----__-------
> rep_user | Replication | {}
>
>
> Also what file do you have primary_conninfo in?
>
>
>
>
>
>
> --
> *Volkan Unsal*
> /web and mobile development/
> volkanunsal.com <http://volkanunsal.com> <http://bit.ly/1h1ebjy>
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>
>
>
>
> --
> *Volkan Unsal*
> /web and mobile development/
> volkanunsal.com <http://bit.ly/1h1ebjy>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Volkan Unsal 2015-04-09 19:39:52 Re: no pg_hba.conf entry for replication connection from host
Previous Message Volkan Unsal 2015-04-09 19:32:39 Re: no pg_hba.conf entry for replication connection from host