[pgpool-general: 8378] Re: Re: pgpoolAdmin 4.2 doesnt see state of postgres, but pcp_status and "show pool_nodes" works

Michal Jerabek jerabkin at post.cz
Tue Sep 6 22:58:47 JST 2022



Thank you for an asnwer. All settings and access to files, included 
executable to all pcp command seems to be ok.

For a test when I run command, sudo -u apache pcp_status I get valid answers
and states.




It strange that I get status in Node status like> 


node 0	172.27.8.249	5432	Up. Connected.	postgres: Down	






I think, that  in case of bad permisson, there would  not be any state, 
would be? But in this case just postgres status is missing.




Michal










Od: Bo Peng <pengbo at sraoss.co.jp> 
Komu: Michal Jerabek <jerabkin at post.cz> 
Kopie: <pgpool-general at pgpool.net> 
Odesláno: 2.9.2022 4:52 
Předmět: Re: [pgpool-general: 8363] pgpoolAdmin 4.2 doesnt see state of 
postgres, but pcp_status and "show pool_nodes" works 

"Hello, 

On Wed, 31 Aug 2022 15:28:46 +0200 (CEST) 
"Michal Jerabek" <jerabkin at post.cz> wrote: 

> 
> Hello, 
> 
> 
> 
> 
> i  made install of 2 nodes with postgresql-14 (4.6), pgpool-II (4.3.2.) 
and 
> pgpoolAdmin on RHEL 8.6 (selinux permissive), all postgres related 
> components from repos (https://download.postgresql.org/pub/repos/yum/14/ 
> redhat/rhel-8-x86_64/ and https://apt.postgresql.org/pub/repos/yum/common/

> redhat/rhel-8-x86_64/). 
> 
> 
> 
> 
> And I have problem that pgpoolAdmin component show state of postgres 
always 
> "down" either in pgpool status and Node status , but postgres is running, 

> standard database connection to db backend throught  pgpool works and I am

> able to attach and dettach nodes from command line. 
> 
> 
> 
> 
> PCP status command shows right state of components, and also query to 
"show 
> pool_nodes" works, where should be a problem? where pgpoolAdmin get states

> from? 

PgpoolAdmin runs PCP command to get the states. 
Please make sure that your Apache user is able to read .pcppass and pcp.
conf. 


> pcp_status 
> Node 0: 
> Hostname               : 172.27.8.249 
> Port                   : 5432 
> Status                 : 2 
> Weight                 : 0.500000 
> Status Name            : up 
> Backend Status Name    : up 
> Role                   : primary 
> Backend Role           : primary 
> Replication Delay      : 0 
> Replication State      : none 
> Replication Sync State : none 
> Last Status Change     : 2022-08-31 15:07:04 
> 
> 
> Node 1: 
> Hostname               : 172.27.8.250 
> Port                   : 5432 
> Status                 : 2 
> Weight                 : 0.500000 
> Status Name            : up 
> Backend Status Name    : up 
> Role                   : standby 
> Backend Role           : primary 
> Replication Delay      : 402654288 
> Replication State      : none 
> Replication Sync State : none 
> Last Status Change     : 2022-08-31 15:07:04 
> 
> 
> 
> 
> 
> (of course there is no correct active/standby state, both backend are 
> primary, prepared for recovery/sync) 
> 
> 
> 
> 
> 
> $ psql -h VIPADDRESS -p 5433 -U pgpool postgres -c "show pool_nodes" 
>  node_id |   hostname   | port | status | pg_status | lb_weight |  role   
| 
> pg_role | select_cnt | load_balance_node | replication_delay | replication
_ 
> state | replication_sync_state | last_sta 
> tus_change 
> ---------+--------------+------+--------+-----------+-----------+---------
+- 
> --------+------------+-------------------+-------------------+------------
-- 
> -----+------------------------+--------- 
> ------------ 
>  0       | 172.27.8.249 | 5432 | up     | up        | 0.500000  | primary 
| 
> primary | 72         | false             | 0                 |            
   
>      |                        | 2022-08- 
> 31 15:07:04 
>  1       | 172.27.8.250 | 5432 | up     | up        | 0.500000  | standby 
| 
> primary | 83         | true              | 402654288         |            
   
>      |                        | 2022-08- 
> 31 15:07:04 
> (2 rows) 
> 
> 
> 
> 
> 
> 
> Thank you for help 
> 
> 
> 
> 
> Michal 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I have similiar expierence wiht installing same versions of psql, pgpool-
II 
> and pgpoolAdmin on Centos8 stream, where there is no problem there. 


-- 
Bo Peng <pengbo at sraoss.co.jp> 
SRA OSS LLC 
https://www.sraoss.co.jp/ "
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20220906/8818537a/attachment.htm>


More information about the pgpool-general mailing list