pg_basebackup未连接到EC2主实例

时间:2014-12-13 13:08:28

标签: postgresql amazon-ec2 ubuntu-14.04

以下命令:

sudo -u postgres pg_basebackup -h master-ip -D /var/lib/postgresql/9.3/main -U rep -v -P -x

返回以下错误

pg_basebackup: could not connect to server: could not connect to server: Connection refused
    Is the server running on host "master-ip" and accepting
    TCP/IP connections on port 5432?

尽管主EC2实例具有以下规则:

Custom TCP Rule  TCP  5432  slave-ip/32

并且主人的/etc/postgresql/9.3/main/pg_hba.conf文件包括:

host    all             all             127.0.0.1/32        md5
host    all             ubuntu          master-ip/32        trust
host    all             ubuntu          slave-ip/32         md5
host    all             postgres        slave-ip/32         md5
host    replication     replicator      slave-ip/32         md5

主实例和从属实例都是EC2实例,但是是从不同的帐户创建的。

这里有什么问题?

0 个答案:

没有答案