[pgpool-general: 8183] Re: Setting up an streaming replication cluster is giving me trouble

Felix Rubio felix at kngnt.org
Fri May 27 04:46:29 JST 2022


I have managed to get a bit further, by adding
     echo "listen_addresses = '*'" >> $CONF
to pgpool_setup. Now I get the following error, for nodes 1 and 2:

recovery node 1...ERROR:  recovery is checking if postmaster is started
DETAIL:  postmaster on hostname:"/tmp" database:"template1" 
user:"postgres" failed to start in 90 second

There is no postgresql started on the data folder for those nodes, and I 
see that in bash function create_followers there is a call to $STARTALL 
if mode is not 's', but there is nothing like it in case the setup is 
for stream replication. Could it be that there is a call to start those 
other node's servers missing?

Regards!

---
Felix Rubio
"Don't believe what you're told. Double check."

On 2022-05-26 14:18, Felix Rubio wrote:
> Hi everybody!
> 
> I am trying to set up a streaming replication cluster, using docker
> containers based on alpine. Inside the container, this is what I am
> doing right now:
> 
> apk add postgresql14
> curl -s
> https://raw.githubusercontent.com/pgpool/pgpool2/master/src/sample/pgpool.conf.sample-stream
> > /etc/pgpool/pgpool.conf.sample
> curl -s
> https://raw.githubusercontent.com/pgpool/pgpool2/master/src/sample/pool_hba.conf.sample
> > /etc/pgpool/pool_hba.conf.sample
> cd /scratch
> rm -rf * && su-exec postgres pgpool_setup -n 3
> 
> This is the output I am getting:
> --------------------
> /scratch # rm -rf * && su-exec postgres pgpool_setup -n 3
> PostgreSQL major version: 140
> Starting set up in streaming replication mode
> creating startall and shutdownall
> creating failover script
> creating database cluster /scratch/data0...done.
> update postgresql.conf
> creating pgpool_remote_start
> creating basebackup.sh
> creating recovery.conf
> creating database cluster /scratch/data1...done.
> update postgresql.conf
> creating pgpool_remote_start
> creating basebackup.sh
> creating recovery.conf
> creating database cluster /scratch/data2...done.
> update postgresql.conf
> creating pgpool_remote_start
> creating basebackup.sh
> creating recovery.conf
> temporarily start data0 cluster to create extensions
> temporarily start pgpool-II to create standby nodes
> 2022-05-26 12:13:04.670: main pid 1861: FATAL:  could not read pid file
> psql: error: connection to server on socket "/tmp/.s.PGSQL.11000"
> failed: No such file or directory
> 	Is the server running locally and accepting connections on that 
> socket?
> psql: error: connection to server on socket "/tmp/.s.PGSQL.11000"
> failed: No such file or directory
> 	Is the server running locally and accepting connections on that 
> socket?
> psql: error: connection to server on socket "/tmp/.s.PGSQL.11000"
> failed: No such file or directory
> 	Is the server running locally and accepting connections on that 
> socket?
> [..... this message appears a number of times ....]
> recovery node 1...ERROR: connection to host "localhost" failed with
> error "Connection refused"
> done.
> recovery node 2...ERROR: connection to host "localhost" failed with
> error "Connection refused"
> done.
> creating follow primary script
> psql: error: connection to server on socket "/tmp/.s.PGSQL.11000"
> failed: No such file or directory
> 	Is the server running locally and accepting connections on that 
> socket?
> shutdown all
> 
> pgpool-II setting for streaming replication mode is done.
> To start the whole system, use /scratch/startall.
> To shutdown the whole system, use /scratch/shutdownall.
> pcp command user name is "postgres", password is "postgres".
> Each PostgreSQL, pgpool-II and pcp port is as follows:
> #1 port is 11002
> #2 port is 11003
> #3 port is 11004
> pgpool port is 11000
> pcp port is 11001
> The info above is in README.port.
> --------------------
> 
> I have checked and, indeed, the socket /tmp/.s.PGSQL.11000 does not
> exist. If I run a ps during the script execution, I can see the
> postgres server running:
> --------------------
>  2247 postgres  0:00 /usr/libexec/postgresql14/postgres -D data0
>  2248 postgres  0:00 postgres: logger
>  2250 postgres  0:00 postgres: checkpointer
>  2251 postgres  0:00 postgres: background writer
>  2252 postgres  0:00 postgres: walwriter
>  2253 postgres  0:00 postgres: autovacuum launcher
>  2254 postgres  0:00 postgres: archiver
>  2255 postgres  0:00 postgres: stats collector
>  2256 postgres  0:00 postgres: logical replication launcher
> --------------------
> 
> So... I am kind of lost here... what can I do? Thank you!



More information about the pgpool-general mailing list