lundi 23 février 2015

pg_basebackup giving "could not receive data from client: Connection reset by peer"


I'm trying to get data to a new slave box from my new master (previously the slave).


I've tried the steps already and it worked previously. Now when I run the following command:



pg_basebackup -h masterhost -D /var/lib/postgresql/9.3/main -U rep -v -P -X stream


Sometimes when I run this command, nothing is logged. Other times I receive: "could not receive data from client: Connection reset by peer". I can see this process running on the master:



postgres: wal sender process rep slavehost(60899) sending backup "pg_basebackup base backup"



  • I'm able to scp from one box to another at 100MB/s

  • I've set up the snakeoil certs on both boxes

  • It rejects invalid passwords

  • When I kill the process on the slave, I get "pg_basebackup: could not initiate base backup: FATAL: terminating connection due to administrator command"

  • There is no additional load on either box when I run this command

  • The /var/lib/postgresql/9.3/main dir on the slave is owned by postgres and is empty

  • The DB is ~60GB

  • Eventually the "wal sender process" on the master ends but nothing seems to happen

  • I can psql to the master box from the slave using a non-replication user





Aucun commentaire:

Enregistrer un commentaire