[pgpool-general: 9353] Re: pgpool 4.5.5 can't reach stand by server
Mauricio Fernandez
mmauricio.fernandez at gmail.com
Wed Feb 12 23:21:12 JST 2025
Hola Tatsuo
I've tried the command
[postgres at buda pgpool-II]$ pcp_attach_node -p 9898 -h localhost 1
FATAL: authentication failed for user "postgres"
DETAIL: username and/or password does not match
May be this authentication error is the source problem at all..
Right now, the pgpool.conf setting have the following:
sr_check_period = 10
sr_check_user = 'postgres'
sr_check_password = 'the_postgres_passw'
health_check_user = 'postgres'
health_check_password = ' the_postgres_passw'
health_check_database = 'postgres'
Initially I had let the passwords parameters empty '' and set the passwords
through
pg_enc -m -f /etc/pgpool-II/pgpool.conf -u postgres -k
/var/lib/pgsql/.pgpoolkey
[postgres at buda pgpool-II]$ cat pool_passwd
postgres:AESSW1V5WTuP1xf1xFenoLDhA==
Obviously didn't work...
I'm assuming one of the check users (sr or health ) is used by pgpool.
Thank you very much for your support
Kind regards
Mauricio
El mar, 11 feb 2025 a las 9:20, Tatsuo Ishii (<ishii at postgresql.org>)
escribió:
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20250212/f3177a43/attachment.htm>
More information about the pgpool-general
mailing list