replication problems

From: Owen Marinas <owenmarinas(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: replication problems
Date: 2011-06-07 18:04:03
Message-ID: 4DEE6813.5000900@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I configured replication in 2 AWS instances.
I have shell scripts to dynamically configure the Ips after the
instances are UP.
the Postgres versions are the same in master & slave, also the
architecture of instances.

Added the lines in the Master
root(at)ip-172-19-1-37:~# cat /etc/postgresql/9.0/main/pg_hba.conf |grep trust
host all postgres 172.19.1.101/32 trust

root(at)ip-172-19-1-37:~# tail -n6 /etc/postgresql/9.0/main/postgresql.conf
wal_level = hot_standby
max_wal_senders = 5
wal_keep_segments = 32
archive_mode = on
archive_command = 'cp %p /nfsdata/postgres_wal/main_cware/%f'

And in the slave
root(at)ip-172-19-1-101:~# cat /var/lib/postgresql/9.0/main/recovery.conf
standby_mode = 'on'
trigger_file = '/path_to/trigger'
restore_command = 'cp /nfsdata/postgres_wal/main_cware/%f "%p"'
primary_conninfo = 'host=172.19.1.37 port=5432 user=postgres'

root(at)ip-172-19-1-101:~# cat /etc/postgresql/9.0/main/postgresql.conf
|grep hot
hot_standby = on

----------------------------

I have in the master log
2011-06-07 17:53:04 UTC FATAL: no pg_hba.conf entry for replication
connection from host "172.19.1.101", user "postgres", SSL off
2011-06-07 17:53:09 UTC FATAL: no pg_hba.conf entry for replication
connection from host "172.19.1.101", user "postgres", SSL off

and in the slave
cp: cannot stat
`/nfsdata/postgres_wal/main_cware/00000001000000000000002E': No such
file or directory
2011-06-07 17:53:34 UTC FATAL: could not connect to the primary server:
FATAL: no pg_hba.conf entry for replication connection from host
"172.19.1.101", user "postgres", SSL off

__________________________________

I'm rsync the files from master
rsync -a --delete --exclude postmaster.pid --exclude pg_xlog
/data/postgresql/main/ /nfsdata/postgres_wal/main_cware/bkp/

and restoring the DB in slave
rsync -a --exclude '.conf' /nfsdata/postgres_wal/main_cware/bkp/
/var/lib/postgresql/9.0/main

replication is not working since the records added to te master car not
present in the slave.
Any help will be appreciated.

regards
Owen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Owen Marinas 2011-06-07 18:05:21 replication problems 9.0
Previous Message Merlin Moncure 2011-06-07 16:51:11 Re: Need suggestion