Hi, I'm a bit too lazy to try suss out the exact reasons for your failure, but here is a reasonably thorough guide to set up replication: http://dba.stackexchange.com/a/53546/24393
A few tips:
- Having the master ship WALs to the slaves is handy if you can pull it off. If you are doing it over the wire and using rsync, "-z" for compression is recommended. If you are doing the tar format of the pg_basebackup, you *must* have the master ship the WALs to the slave otherwise it won't be able to synchronize (the "stream" method ships WALs over the wire so the end result is a synchronized system.
- I always run pg_basebackup from the slave I am building, for simplicity.
- I create new slaves almost every day (we have thousands of databases) using a bash script and it almost much never fails. In essence it is a big wrapper around the pg_basebackup command (though we are using pg93 mostly).
The base backup command that I run from the slave I am building: pg_basebackup --pgdata=$PGDATA --host=$MASTER_IP --port=$PGPORT --username=replication --no-password --xlog-method=stream --format=plain --progress --verbose