Home > Archive > Slony1 PostgreSQL Replication > August 2005 > Authentication / Connection Problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Authentication / Connection Problem
Andrew Gold

2005-08-08, 1:27 pm

Hi everyone,

I'm having connection problems when I try to run slon on my master
database. The master was configured with the following connection lines:

node 1 admin conninfo = 'dbname=$MASTERDBNAM
E host=$MASTERHOST
port=$MASTERPORT user=$MASTERDBA password=mypass';
node 2 admin conninfo = 'dbname=$SLAVEDBNAME
host=$SLAVEHOST
port=$SLAVEPORT user=$SLAVEDBA password=mypass';

I invoke slon with the following confg value:
conn_info='dbname=$M
ASTERDBNAME user=$MASTERDBA password=mypass
host=$MASTERHOST port=$MASTERPORT'

I read in my slon logs:

2005-08-05 14:19:27 EDT WARN remoteListenThread_2
: DB connection
failed - sleep 10 seconds
2005-08-05 14:19:29 EDT DEBUG2 syncThread: new sl_action_seq 1 - SYNC 42
2005-08-05 14:19:29 EDT DEBUG2 localListenThread: Received event 1,42 SYNC
2005-08-05 14:19:37 EDT ERROR slon_connectdb:
PQconnectdb("dbname=$SLAVEDBNAME host=$SLAVEHOST port=$SLAVEPORT
user=$SLAVEDBA ") failed - fe_sendauth: no password supplied

It appears that I'm failing to submit a password, but that seems totally
contrary to my configuration values.
I'm sure that I'm missing something simple here; any suggestions are
greatly welcome.

Thanks,

Andrew Gold
Tim Goodaire

2005-08-08, 8:25 pm

____________________
____________________
_______
Slony1-general mailing list
Slony1-general- AuKwsB3Fm+ugFIWk8tvy
RWD2FQJk+8+b@public.gmane.org
http://gborg.postgresql.org/mailman.../slony1-general

Christopher Browne

2005-08-08, 8:25 pm

Andrew Gold <agold- KYGb9BtcTCtWk0Htik3J
/w@public.gmane.org> writes:
> Hi everyone,
>
> I'm having connection problems when I try to run slon on my master
> database. The master was configured with the following connection lines:
>
> node 1 admin conninfo = 'dbname=$MASTERDBNAM
E host=$MASTERHOST
> port=$MASTERPORT user=$MASTERDBA password=mypass';
> node 2 admin conninfo = 'dbname=$SLAVEDBNAME
host=$SLAVEHOST
> port=$SLAVEPORT user=$SLAVEDBA password=mypass';
>
> I invoke slon with the following confg value:
> conn_info='dbname=$M
ASTERDBNAME user=$MASTERDBA password=mypass
> host=$MASTERHOST port=$MASTERPORT'
>
> I read in my slon logs:
>
> 2005-08-05 14:19:27 EDT WARN remoteListenThread_2
: DB connection
> failed - sleep 10 seconds
> 2005-08-05 14:19:29 EDT DEBUG2 syncThread: new sl_action_seq 1 - SYNC 42
> 2005-08-05 14:19:29 EDT DEBUG2 localListenThread: Received event 1,42 SYNC
> 2005-08-05 14:19:37 EDT ERROR slon_connectdb:
> PQconnectdb("dbname=$SLAVEDBNAME host=$SLAVEHOST port=$SLAVEPORT
> user=$SLAVEDBA ") failed - fe_sendauth: no password supplied
>
> It appears that I'm failing to submit a password, but that seems totally
> contrary to my configuration values.
> I'm sure that I'm missing something simple here; any suggestions are
> greatly welcome.


The problem is likely with the authentication for paths (stored in
table sl_path in the Slony-I schema).

The "admin conninfo" DSNs are quite distinct from the DSNs configured
using STORE PATH...

In any case, the "Best Practice" is to store passwords in
$HOME/.pgpass, as this means you're not left with storing the password
in raw text form in DSNs that are assortedly findable:
a) As part of process environment or
b) In the table sl_path
--
"cbbrowne","@","ca.afilias.info"
<http://dev6.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com