I'm not a DBA but I have been tasked with setting up a database and streaming replication and repmgr is the tool I have decided to use.
The master goes on fine and I can see it registered in the cluster.
The error on the slave is as follows
[2016-07-22 15:39:35] [NOTICE] using configuration file "/etc/repmgr/repmgr.conf"
[2016-07-22 15:39:35] [NOTICE] destination directory '/var/lib/postgresql/9.4/main' provided
[2016-07-22 15:39:36] [ERROR] aborting, remote host xx.xxx.xxx.xxx is not reachable.
[2016-07-22 15:39:36] [ERROR] unable to drop replication slot "repmgr_slot_2":
ERROR: replication slot "repmgr_slot_2" does not exist
[2016-07-22 15:39:36] [ERROR] unable to take a base backup of the master server
[2016-07-22 15:39:36] [WARNING] destination directory (/var/lib/postgresql/9.4/main) may need to be cleaned up manually
The command casuiging the abover error is
repmgr -f /etc/repmgr/repmgr.conf --force --rsync-only -h dbhost1 -d repmgr -U repmgr --verbose standby clone
The config file is as follows
cluster=test
node=2
node_name=db-002
use_replication_slots=1
conninfo='host=dbhost2 user=repmgr dbname=repmgr'
pg_bindir=/usr/lib/postgresql/9.4/bin
I have tried loging into the dbhost1/masrer from dbhost2/slave using
psql -h xx.xxx.xxx.xxx -p xxxx -d repmgr -U repmgr
and it works just fine so the pg_hba file in dbhost1/master is configured correctly using trust for authentication.