<html><body><div><div>Thank you for an asnwer. All settings and access to files, included executable to all pcp command seems to be ok.</div><div>For a test when I run command, sudo -u apache pcp_status I get valid answers and states.</div><div><br></div><div>It strange that I get status in Node status like> <br><table style="border-top:1px solid lightsteelblue;border-collapse:collapse;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:x-small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:start;text-transform:none;white-space:normal;widows:2;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial"><tbody><tr class="-wm-mcntodd"><td class="-wm-mcntinput" style="padding:4px 8px;border-bottom:1px solid lightsteelblue">node 0</td><td class="-wm-mcntinput" style="padding:4px 8px;border-bottom:1px solid lightsteelblue">172.27.8.249</td><td class="-wm-mcntinput" style="padding:4px 8px;border-bottom:1px solid lightsteelblue">5432</td><td style="padding:4px 8px;border-bottom:1px solid lightsteelblue">Up. Connected.</td><td class="-wm-mcntinput" style="padding:4px 8px;border-bottom:1px solid lightsteelblue">postgres: Down</td></tr></tbody></table></div><div><br></div><div>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.<br></div><div><br></div>Michal</div><div><br></div><div><br></div><div><br></div><div><strong>Od:
</strong>
 
Bo Peng <pengbo@sraoss.co.jp>
<br>
<strong>
Komu:
</strong>
 
Michal Jerabek <jerabkin@post.cz>
<br>
<strong>
Kopie:
</strong>
 
<pgpool-general@pgpool.net>
<br>
<strong>
Odesláno:
 
</strong>
2.9.2022 4:52
<br>
<strong>
Předmět:
</strong>
 
Re: [pgpool-general: 8363] pgpoolAdmin 4.2 doesnt see state of postgres, but pcp_status and "show pool_nodes" works
<br><br><blockquote class="-wm-mcntmori" style="margin:0 0 0 0.8ex;border-left:1px solid #CCC;padding-left:1ex">Hello,
<br>
<br>On Wed, 31 Aug 2022 15:28:46 +0200 (CEST)
<br>"Michal Jerabek" <jerabkin@post.cz> wrote:
<br>
<br>> 
<br>> Hello,
<br>> 
<br>> 
<br>> 
<br>> 
<br>> i  made install of 2 nodes with postgresql-14 (4.6), pgpool-II (4.3.2.) and 
<br>> pgpoolAdmin on RHEL 8.6 (selinux permissive), all postgres related 
<br>> components from repos (https://download.postgresql.org/pub/repos/yum/14/
<br>> redhat/rhel-8-x86_64/ and https://apt.postgresql.org/pub/repos/yum/common/
<br>> redhat/rhel-8-x86_64/).
<br>> 
<br>> 
<br>> 
<br>> 
<br>> And I have problem that pgpoolAdmin component show state of postgres always 
<br>> "down" either in pgpool status and Node status , but postgres is running, 
<br>> standard database connection to db backend throught  pgpool works and I am 
<br>> able to attach and dettach nodes from command line.
<br>> 
<br>> 
<br>> 
<br>> 
<br>> PCP status command shows right state of components, and also query to "show 
<br>> pool_nodes" works, where should be a problem? where pgpoolAdmin get states 
<br>> from?
<br>
<br>PgpoolAdmin runs PCP command to get the states.
<br>Please make sure that your Apache user is able to read .pcppass and pcp.conf.
<br>
<br>
<br>> pcp_status
<br>> Node 0:
<br>> Hostname               : 172.27.8.249
<br>> Port                   : 5432
<br>> Status                 : 2
<br>> Weight                 : 0.500000
<br>> Status Name            : up
<br>> Backend Status Name    : up
<br>> Role                   : primary
<br>> Backend Role           : primary
<br>> Replication Delay      : 0
<br>> Replication State      : none
<br>> Replication Sync State : none
<br>> Last Status Change     : 2022-08-31 15:07:04
<br>> 
<br>> 
<br>> Node 1:
<br>> Hostname               : 172.27.8.250
<br>> Port                   : 5432
<br>> Status                 : 2
<br>> Weight                 : 0.500000
<br>> Status Name            : up
<br>> Backend Status Name    : up
<br>> Role                   : standby
<br>> Backend Role           : primary
<br>> Replication Delay      : 402654288
<br>> Replication State      : none
<br>> Replication Sync State : none
<br>> Last Status Change     : 2022-08-31 15:07:04
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> (of course there is no correct active/standby state, both backend are 
<br>> primary, prepared for recovery/sync)
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> $ psql -h VIPADDRESS -p 5433 -U pgpool postgres -c "show pool_nodes"
<br>>  node_id |   hostname   | port | status | pg_status | lb_weight |  role   | 
<br>> pg_role | select_cnt | load_balance_node | replication_delay | replication_
<br>> state | replication_sync_state | last_sta
<br>> tus_change
<br>> ---------+--------------+------+--------+-----------+-----------+---------+-
<br>> --------+------------+-------------------+-------------------+--------------
<br>> -----+------------------------+---------
<br>> ------------
<br>>  0       | 172.27.8.249 | 5432 | up     | up        | 0.500000  | primary | 
<br>> primary | 72         | false             | 0                 |              
<br>>      |                        | 2022-08-
<br>> 31 15:07:04
<br>>  1       | 172.27.8.250 | 5432 | up     | up        | 0.500000  | standby | 
<br>> primary | 83         | true              | 402654288         |              
<br>>      |                        | 2022-08-
<br>> 31 15:07:04
<br>> (2 rows)
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> Thank you for help
<br>> 
<br>> 
<br>> 
<br>> 
<br>> Michal
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> 
<br>> I have similiar expierence wiht installing same versions of psql, pgpool-II 
<br>> and pgpoolAdmin on Centos8 stream, where there is no problem there.
<br>
<br>
<br>-- 
<br>Bo Peng <pengbo@sraoss.co.jp>
<br>SRA OSS LLC
<br>https://www.sraoss.co.jp/
</blockquote></div></body></html>