View Issue Details

IDProjectCategoryView StatusLast Update
0000583Pgpool-II[All Projects] Generalpublic2020-03-05 10:20
Reporterlyon0619Assigned Topengbo 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionopen 
Product Version4.1.0 
Target VersionFixed in Version 
Summary0000583: pcp_recovery_node return "unable to connect to master node"
DescriptionHi Support,
I am new to PGPool II and getting crazy about PCP connecting to PG backend nodes.
PG: 12
PGPooll: 4.1

I am getting below errors and get no clue why. (as other PCP commands run successfully)
[root@dev-postgresdb-test1 etc]# pcp_recovery_node -h 10.212.164.20 -p 9898 -U postgres -n 2 -d
Password:
DEBUG: recv: tos="m", len=8
DEBUG: recv: tos="r", len=21
DEBUG: send: tos="D", len=6
DEBUG: recv: tos="E", len=95
ERROR: node recovery failed, unable to connect to master node: 0



[root@dev-postgresdb-test1 etc]# pcp_watchdog_info -p 9898 -h 10.212.164.20 -U pgpool
Password:
3 YES dev-postgresdb-test1:9999 Linux dev-postgresdb-test1 dev-postgresdb-test1

dev-postgresdb-test1:9999 Linux dev-postgresdb-test1 dev-postgresdb-test1 9999 9000 4 MASTER
dev-postgresdb-test2:9999 Linux dev-postgresdb-test2 dev-postgresdb-test2 9999 9000 7 STANDBY
dev-postgresdb-test3:9999 Linux dev-postgresdb-test3 dev-postgresdb-test3 9999 9000 7 STANDBY

DEBUG: send: tos="X", len=4

[root@dev-postgresdb-test1 etc]# pcp_node_info -h 10.212.164.20 -p 9898 -U postgres -n 0
Password:
dev-postgresdb-test1 5422 2 0.333333 up primary 0 2020-02-12 21:10:36

I would be appreciated if you look into it.

Thanks

Lyon
Tagspcp

Activities

pengbo

2020-02-13 10:23

developer   ~0003196

Last edited: 2020-02-13 10:23

View 2 revisions

Did you set "recovery_user" and "recovery_password" in pgpool.conf?
Also "recovery_user" needs superuser privilege.

See example:
https://www.pgpool.net/docs/latest/en/html/example-cluster.html#EXAMPLE-CLUSTER-PGPOOL-CONFIG-ONLINE-RECOVERY

lyon0619

2020-02-13 16:05

reporter   ~0003197

Hi Pengbo,
Thanks for your reply. Sorry to mention I am following procedure below to setup the PG+PGPool cluster.
https://www.pgpool.net/docs/latest/en/html/example-cluster.html
Linux 7.2
PG12
PGPooll 4.1

Yes, I set recovery_user to postgres that should have Superuser role on PostgreSQL.
recovery_password is left blank as pool_passwd is in place for autentication.

[root@dev-postgresdb-test1 etc]# ls -lht pool_passwd
-rw-r--r-- 1 root root 88 Jan 21 13:38 pool_passwd
[root@dev-postgresdb-test1 etc]# cat pool_passwd
postgres:md5a2b288a972fa230e9e7574715333d841
pgpool:md539ef55ae8fcc55dde7c7d521deefdae5
[root@dev-postgresdb-test1 etc]# pwd
/opt/pgpool410/etc

Attached please find my pgpool.conf and query results for postgres in PostgreSQL12.

pgpool.conf (42,168 bytes)
postgres_dbPrivs.log (1,163 bytes)

lyon0619

2020-02-13 16:12

reporter   ~0003198

By the way,
My PGPool is owned by root while PostgresSQL is owned by postgres OS user. Could this be the issue?
Thanks

pengbo

2020-03-04 13:50

developer   ~0003238

Sorry for late response.

It seems that connecting to backend PostgreSQL failed.
Could you connect postgresql node0 using the password included in "pool_passwd"?

# psql -h dev-postgresdb-test1 -p 5422 -U postgres

lyon0619

2020-03-04 20:29

reporter   ~0003243

Setting plain password to pool_passwd resolved the issue.

Thanks Pengbo

pengbo

2020-03-05 10:19

developer   ~0003244

OK. I am going to close this issue.

Issue History

Date Modified Username Field Change
2020-02-12 22:54 lyon0619 New Issue
2020-02-12 22:54 lyon0619 Tag Attached: pcp
2020-02-13 10:23 pengbo Note Added: 0003196
2020-02-13 10:23 pengbo Note Edited: 0003196 View Revisions
2020-02-13 10:23 pengbo Assigned To => pengbo
2020-02-13 10:23 pengbo Status new => feedback
2020-02-13 16:05 lyon0619 File Added: postgres_dbPrivs.log
2020-02-13 16:05 lyon0619 File Added: pgpool.conf
2020-02-13 16:05 lyon0619 Note Added: 0003197
2020-02-13 16:05 lyon0619 Status feedback => assigned
2020-02-13 16:12 lyon0619 Note Added: 0003198
2020-03-04 13:50 pengbo Note Added: 0003238
2020-03-04 13:50 pengbo Status assigned => feedback
2020-03-04 20:29 lyon0619 Note Added: 0003243
2020-03-04 20:29 lyon0619 Status feedback => assigned
2020-03-05 10:19 pengbo Note Added: 0003244
2020-03-05 10:20 pengbo Status assigned => resolved