[pgpool-general: 9350] Re: pgpool 4.5.5 can't reach stand by server
Tatsuo Ishii
ishii at postgresql.org
Tue Feb 11 21:20:20 JST 2025
> From the master node (192.168.0.160) I can connect to the server1, the
> stand by server
>
> [postgres at buda pgpool-II]$ psql -h 192.168.0.162 -U postgres -p 5434
> Contraseña para usuario postgres:
> psql (17.2)
> Digite «help» para obtener ayuda.
> postgres=# \q
>
> [postgres at buda pgpool-II]$ pcp_attach_node -p 9898 -h 192.168.0.162 -n 1 -U
> postgres
> ERROR: connection to host "192.168.0.162" failed with error "No route to
> host"
>
> In pgpool.con, the pcp parameters are:
>
> pcp_listen_addresses = '*'
> #pcp_port = 9898
> pcp_socket_dir = '/var/run/postgresql'
> #log_pcp_processes = on
The pcp_attach_node command needs to connect to pgpool, not standby
PostgreSQL server. So you should run the command on 192.168.0.160 with
command line: pcp_attach_node -p 9898 -h localhost 1
> Even if the attaching process would work, I don't understand why it is
> necessary and pgpool don't try to reach stand by server at the starting up
> time.
Because pgpool remembers that node 1 (standby) was down. You need to
teach pgpool that now node 1 comes up. This is intentional to not
automatically attach broken server.
> By de the way, for me was not easy install pgpool. The process failed
> because inexistent library libmemcached.so.11. After a while I could reach
> the correct rpm from
> https://oraclelinux.pkgs.org/9/ol9-codeready-builder-x86_64/libmemcached-awesome-1.1.0-12.el9.x86_64.rpm.html
>
> dnf install ./libmemcached-awesome-1.1.0-12.el9.x86_64.rpm
>
> After installing the library and editing
> /etc/yum.repos.d/pgdg-redhat-all.repo adding exclude=pgpool* in each
> postgresql section
> I could install pgpool.
Maybe you are using RPM which is not Pgpool-II community RPM?
https://www.pgpool.net/yum/
BTW you seem to set backend_hostname0 = 'localhost', which is not
recommended. You'd better to set backend_hostname0 = '192.169.0.160'
instead.
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
More information about the pgpool-general
mailing list