Hello team,
During settings up Master-Standby Replication for Postgres according to the 'Private Cloud Install-Config Guide', even if there are two NIC devices on both master/standby servers which can communicate with each other, it seems to use always the one communicating with MS server or the IP from /etc/hosts by default. And if we specify the IP of the second NIC at the following steps of 'Set up Master-Standby Replication for Postgres' in the guide,
"Enter server ip of master" and "Enter server ip of standby"
the installation fails with
ERROR: postgres server is down or does not seem be 'slave' Continue anyhow y/(n) y Error: Cannot get status of postgres server
I would like to know how we can specify the IP addresses of specific NIC on master/standby postgres servers replication. And then we see the output of the curl command:
curl http://<MS ServerIP>:8080/v1/servers
such as;
... "externalHostName" : "localhost", "externalIP" : <PS ServerIP>, "internalHostName" : "localhost", "internalIP" : <PS ServerIP>, ... "type" : [ "postgres-server" ],
Where can we specify the externalIP/internalIP above?
Solved! Go to Solution.
I could confirm this locally thanks to Naveen and Kaushal from Services team. The PostgreSQL standard config file: /opt/apigee4/data/postgresql/pgdata/pg_hba.conf can specify the IP address to be used for replication as follows whatever from which NIC with configured as eth0, eth1, ....
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 0.0.0.0/0 md5 # IPv6 local connections: host all all ::1/128 md5
And the 'internalIP' shown on the /servers resource as above is given from the value.
I could confirm this locally thanks to Naveen and Kaushal from Services team. The PostgreSQL standard config file: /opt/apigee4/data/postgresql/pgdata/pg_hba.conf can specify the IP address to be used for replication as follows whatever from which NIC with configured as eth0, eth1, ....
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 0.0.0.0/0 md5 # IPv6 local connections: host all all ::1/128 md5
And the 'internalIP' shown on the /servers resource as above is given from the value.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |