Barry barry
Mon Mar 13 05:10:16 PST 2006
Hi

I am trying to get replication to work and I am struggling. Frustration 
has set in.
Please could someone help me troubleshoot this (If I'm in the wrong 
place for this, please let me know).
Below is the information that will be needed (please let me know if you 
need any more).

I have the following setup running slony 1.1.5 and POSTGRES 8.0.3.

export CLUSTERNAME=slony_example
export MASTERDBNAME=pgbench
export SLAVEDBNAME=pgbench
export MASTERHOST=10.0.0.1
export SLAVEHOST=10.0.0.2
export REPLICATIONUSER=postgres
export PGBENCHUSER=pgbench

When I start the slon process on the master I get:

slon $CLUSTERNAME "dbname=$MASTERDBNAME user=$REPLICATIONUSER 
host=$MASTERHOST"
2006-03-13 15:04:29 SAST CONFIG main: slon version 1.1.5 starting up
2006-03-13 15:04:29 SAST CONFIG main: local node id = 1
2006-03-13 15:04:29 SAST CONFIG main: launching sched_start_mainloop
2006-03-13 15:04:29 SAST CONFIG main: loading current cluster configuration
2006-03-13 15:04:29 SAST CONFIG storeNode: no_id=2 no_comment='Slave node'
2006-03-13 15:04:29 SAST CONFIG storePath: pa_server=2 pa_client=1 
pa_conninfo="dbname=pgbench host=10.0.0.2 user=postgres" pa_connretry=10
2006-03-13 15:04:29 SAST CONFIG storeListen: li_origin=2 li_receiver=1 
li_provider=2
2006-03-13 15:04:29 SAST CONFIG storeSet: set_id=1 set_origin=1 
set_comment='All pgbench tables'
2006-03-13 15:04:29 SAST CONFIG main: configuration complete - starting 
threads
2006-03-13 15:04:29 SAST DEBUG1 localListenThread: thread starts
NOTICE:  Slony-I: cleanup stale sl_nodelock entry for pid=6564
2006-03-13 15:04:29 SAST CONFIG enableNode: no_id=2
2006-03-13 15:04:29 SAST DEBUG1 main: running scheduler mainloop
2006-03-13 15:04:29 SAST DEBUG1 cleanupThread: thread starts
2006-03-13 15:04:29 SAST DEBUG1 remoteWorkerThread_2: thread starts
2006-03-13 15:04:29 SAST DEBUG1 remoteListenThread_2: thread starts
2006-03-13 15:04:29 SAST DEBUG1 syncThread: thread starts
2006-03-13 15:04:29 SAST DEBUG1 remoteListenThread_2: connected to 
'dbname=pgbench host=10.0.0.2 user=postgres'

When I start the slon process on the slave I get:
slon $CLUSTERNAME "dbname=$SLAVEDBNAME user=$REPLICATIONUSER 
host=$SLAVEHOST"
2006-03-13 15:05:00 SAST CONFIG main: slon version 1.1.5 starting up
2006-03-13 15:05:00 SAST CONFIG main: local node id = 2
2006-03-13 15:05:00 SAST CONFIG main: launching sched_start_mainloop
2006-03-13 15:05:00 SAST CONFIG main: loading current cluster configuration
2006-03-13 15:05:00 SAST CONFIG storeNode: no_id=1 no_comment='Master Node'
2006-03-13 15:05:00 SAST CONFIG storePath: pa_server=1 pa_client=2 
pa_conninfo="dbname=pgbench host=10.0.0.1 user=postgres" pa_connretry=10
2006-03-13 15:05:00 SAST CONFIG storeListen: li_origin=1 li_receiver=2 
li_provider=1
2006-03-13 15:05:00 SAST CONFIG storeSet: set_id=1 set_origin=1 
set_comment='All pgbench tables'
2006-03-13 15:05:00 SAST WARN   remoteWorker_wakeup: node 1 - no worker 
thread
2006-03-13 15:05:00 SAST CONFIG storeSubscribe: sub_set=1 sub_provider=1 
sub_forward='f'
2006-03-13 15:05:00 SAST WARN   remoteWorker_wakeup: node 1 - no worker 
thread
2006-03-13 15:05:00 SAST CONFIG enableSubscription: sub_set=1
2006-03-13 15:05:00 SAST WARN   remoteWorker_wakeup: node 1 - no worker 
thread
2006-03-13 15:05:00 SAST CONFIG main: configuration complete - starting 
threads
2006-03-13 15:05:00 SAST DEBUG1 localListenThread: thread starts
NOTICE:  Slony-I: cleanup stale sl_nodelock entry for pid=6611
NOTICE:  Slony-I: cleanup stale sl_nodelock entry for pid=6620
NOTICE:  Slony-I: cleanup stale sl_nodelock entry for pid=6647
2006-03-13 15:05:00 SAST CONFIG enableNode: no_id=1
2006-03-13 15:05:00 SAST DEBUG1 cleanupThread: thread starts
2006-03-13 15:05:00 SAST DEBUG1 main: running scheduler mainloop
2006-03-13 15:05:00 SAST DEBUG1 remoteWorkerThread_1: thread starts
2006-03-13 15:05:00 SAST DEBUG1 remoteListenThread_1: thread starts
2006-03-13 15:05:00 SAST DEBUG1 syncThread: thread starts
2006-03-13 15:05:00 SAST DEBUG1 remoteWorkerThread_1: helper thread for 
provider 1 created
2006-03-13 15:05:00 SAST DEBUG1 remoteListenThread_1: connected to 
'dbname=pgbench host=10.0.0.1 user=postgres'
2006-03-13 15:05:01 SAST DEBUG1 remoteWorkerThread_1: connected to data 
provider 1 on 'dbname=pgbench host=10.0.0.1 user=postgres'

After this I run a slonik script on the slave :

#!/bin/sh
slonik <<_EOF_
         # ----
         # This defines which namespace the replication system uses
         # ----
         cluster name = $CLUSTERNAME;

         # ----
         # Admin conninfo's are used by the slonik program to connect
         # to the node databases.  So these are the PQconnectdb arguments
         # that connect from the administrators workstation (where
         # slonik is executed).
         # ----
         node 1 admin conninfo = 'dbname=$MASTERDBNAME host=$MASTERHOST 
user=$REPLICATIONUSER';
         node 2 admin conninfo = 'dbname=$SLAVEDBNAME host=$SLAVEHOST 
user=$REPLICATIONUSER';

         # ----
         # Node 2 subscribes set 1
         # ----
         subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
_EOF_

And I get the following on Master:

2006-03-13 15:04:41 SAST DEBUG1 remoteListenThread_2: connected to 
'dbname=pgbench host=10.0.0.2 user=postgres'
2006-03-13 15:06:23 SAST CONFIG storeListen: li_origin=2 li_receiver=1 
li_provider=2

And on Slave:

2006-03-13 15:07:05 SAST CONFIG storeSubscribe: sub_set=1 sub_provider=1 
sub_forward='f'
2006-03-13 15:07:05 SAST CONFIG storeListen: li_origin=1 li_receiver=2 
li_provider=1
2006-03-13 15:07:11 SAST DEBUG1 remoteWorkerThread_1: connected to data 
provider 1 on 'dbname=pgbench host=10.0.0.1 user=postgres'

After this no replication is happening.

Thanks
Barry



More information about the Slony1-general mailing list