Build the master-slave relationship on the standby and execute gs_ctl build -D /gaussdb/data/db1/ -b full -M standby and an error is reported information:
[2022-09-10 17:59:30.432][11944][][gs_ctl]: gs_ctl full build ,datadir is /gaussdb/data/db1 waiting for server to shut down.... done server stopped [2022-09-10 17:59:31.462][11944][][gs_ctl]: current workdir is (/home/omm). [2022-09-10 17:59:31.462][11944][][gs_ctl]: fopen build pid file "/gaussdb/data/db1/gs_build.pid" success [2022-09-10 17:59:31.462][11944][][gs_ctl]: fprintf build pid file "/gaussdb/data/db1/gs_build.pid" success [2022-09-10 17:59:31.468][11944][][gs_ctl]: fsync build pid file "/gaussdb/data/db1/gs_build.pid" success [2022-09-10 17:59:31.469][11944][][gs_ctl]: set gaussdb state file when full build build:db state(BUILDING_STATE), server mode(STANDBY_MODE), build mode(FULL_BUILD). [2022-09-10 17:59:31.470][11944][dn_6001][gs_ctl]: build connection to 10.1.13.30 failed cause could not connect to server: Operation now in progress Is the server running on host "10.1.13.30" and accepting TCP/IP connections on port 26001? . [2022-09-10 17:59:31.470][11944][dn_6001][gs_ctl]: build try host(10.1.13.30) port(26001) failed [2022-09-10 17:59:31.470][11944][dn_6001][gs_ctl]: could not connect to server. [2022-09-10 17:59:31.470][11944][dn_6001][gs_ctl]: full build failed(/gaussdb/data/db1).
Checked the postgresql.conf of the two machines as follows:
replconninfo1 = 'localhost=10.1.13.30 localport=26001 localheartbeatport=26005 localservice=26004 remotehost=10.1.13.107 remoteport=26001 remoteheartbeatport=26005 remoteservice=26004'
Prepare as follows:
replconninfo1 = 'localhost=10.1.13.107 localport=26001 localheartbeatport=26005 localservice=26004 remotehost=10.1.13.30 remoteport=26001 remoteheartbeatport=26005 remoteservice=26004'
The pg_hba.conf of the two machines are as follows:
IPv4 local connections:
host all all 127.0.0.1/32 trust host all all 10.1.13.30/32 sha256 host all all 10.1.13.30/32 trust host all all 10.1.13.107/32 trust host all all 0.0.0.0/0 md5
IPv6 local connections:
host all all ::1/128 trust