<div dir="ltr">By the way, se pg_hba.conf for the primary server has this lines<div><br></div><div># TYPE  DATABASE        USER            ADDRESS                 METHOD<br><br># "local" is for Unix domain socket connections only<br>#local   all             all                                     trust<br><b>local   all             all                                     scram-sha-256</b><br><br># IPv4 local connections:<br>#host    all             all             <a href="http://127.0.0.1/32">127.0.0.1/32</a>            scram-sha-256<br>#host    all             all             <a href="http://192.168.0.0/24">192.168.0.0/24</a>         scram-sha-256<br><b>host    all             all             <a href="http://0.0.0.0/0">0.0.0.0/0</a>               scram-sha-256</b><br># Allow replication connections from localhost, by a user with the<br># replication privilege.<br>host    replication     replicador      <a href="http://192.168.1.0/24">192.168.1.0/24</a>        scram-sha-256</div><div><br></div><div>thaks</div><div><br></div><div>kind regards</div><div><br></div><div>Mauricio</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">El mar, 11 feb 2025 a las 9:20, Tatsuo Ishii (<<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> From the master node (192.168.0.160) I can connect to the server1, the<br>
> stand by server<br>
> <br>
> [postgres@buda pgpool-II]$ psql -h 192.168.0.162 -U postgres -p 5434<br>
> Contraseña para usuario postgres:<br>
> psql (17.2)<br>
> Digite «help» para obtener ayuda.<br>
> postgres=# \q<br>
> <br>
> [postgres@buda pgpool-II]$ pcp_attach_node -p 9898 -h 192.168.0.162 -n 1 -U<br>
> postgres<br>
> ERROR: connection to host "192.168.0.162" failed with error "No route to<br>
> host"<br>
> <br>
> In pgpool.con, the pcp parameters are:<br>
> <br>
> pcp_listen_addresses = '*'<br>
>  #pcp_port = 9898<br>
>  pcp_socket_dir = '/var/run/postgresql'<br>
>  #log_pcp_processes = on<br>
<br>
The pcp_attach_node command needs to connect to pgpool, not standby<br>
PostgreSQL server. So you should run the command on 192.168.0.160 with<br>
command line: pcp_attach_node -p 9898 -h localhost 1<br>
<br>
> Even if the attaching process would work, I don't understand why it is<br>
> necessary and pgpool don't try to reach stand by server at the starting up<br>
> time.<br>
<br>
Because pgpool remembers that node 1 (standby) was down. You need to<br>
teach pgpool that now node 1 comes up. This is intentional to not<br>
automatically attach broken server.<br>
<br>
> By de the way, for me was not easy install pgpool. The process failed<br>
> because inexistent library libmemcached.so.11. After a while I could reach<br>
> the correct rpm from<br>
> <a href="https://oraclelinux.pkgs.org/9/ol9-codeready-builder-x86_64/libmemcached-awesome-1.1.0-12.el9.x86_64.rpm.html" rel="noreferrer" target="_blank">https://oraclelinux.pkgs.org/9/ol9-codeready-builder-x86_64/libmemcached-awesome-1.1.0-12.el9.x86_64.rpm.html</a><br>
> <br>
>  dnf install ./libmemcached-awesome-1.1.0-12.el9.x86_64.rpm<br>
> <br>
> After installing the library and editing<br>
> /etc/yum.repos.d/pgdg-redhat-all.repo adding exclude=pgpool* in each<br>
> postgresql section<br>
> I could install pgpool.<br>
<br>
Maybe you are using RPM which is not Pgpool-II community RPM?<br>
<br>
<a href="https://www.pgpool.net/yum/" rel="noreferrer" target="_blank">https://www.pgpool.net/yum/</a><br>
<br>
BTW you seem to set backend_hostname0 = 'localhost', which is not<br>
recommended. You'd better to set backend_hostname0 = '192.169.0.160'<br>
instead.<br>
<br>
Best reagards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS K.K.<br>
English: <a href="http://www.sraoss.co.jp/index_en/" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en/</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div>