View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000187 | pgpoolAdmin | Incompatible change | public | 2016-04-05 18:33 | 2016-12-27 18:44 |
| Reporter | mikhail | Assigned To | anzai | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | open | ||
| Platform | x64 | OS | Linux | OS Version | Ubuntu 14.04 |
| Summary | 0000187: pcp_* functions call interface changed in pgpool 3.5 but pgpooladmin use old call mechanism | ||||
| Description | Any function call In pgpooladmin web pages resulted error message like "pcp_proc_count command error occurred." or "pcp_node_count command error occurred." etc. Following error printed in web server error log: FATAL: authentication failed for user "postgres" DETAIL: username and/or password does not match. If I call for example pcp_proc_count from shell I promted with password, but in pgpool 3.4 I call pcp_* commands with password in parameter list (i.e. without need to input password after entering command). In pgpoolAdmin`s command.php at 80-162 strings pcp_* commands invoked in old fashion like "pcp_command -w -h hostname -p port_num -U user". If I try to invoke any of pcp_* in such way in shell, I get same error as in web server error log: FATAL: authentication failed for user "postgres" DETAIL: username and/or password does not match. | ||||
| Steps To Reproduce | 1) Install pgpool-3.5.1 and pgpoolAdmin 3.5.1 from sources according to documentation. 2) Add pcp user postgres (or any you prefer) with md5 hashed password to pcp.conf 3) Start pgpool with command: pgpool -n -D -d >pgpool.log 2>&1 & 4) Open pgpoolAdmin web interface, login as user 'postgres' and go to 'pgPool Status' tab. If pgpool state in bottom of page is "not running" try start/restart buttons. Then click on any of 'Process Info', 'Node Info' buttons or 'Node Status' tab and check "Backend info (PostgreSQL)" part for error messages like: pcp_node_count command error occurred, pcp_proc_count command error occurred etc... 5) Check web server error.log (/var/log/apache2/error.log in my case) for error message(s): FATAL: authentication failed for user "postgres" DETAIL: username and/or password does not match. 6) invoke any pcp_* command in shell, for example: $pcp_proc_count -w -h localhost -p 9898 -U postgres Check that result is: FATAL: authentication failed for user "postgres" DETAIL: username and/or password does not match 7) invoke same command in shell (without arguments in case of pcp_proc_count), enter password when shell prompts and check that command works! | ||||
| Tags | No tags attached. | ||||
|
|
Is there .pcppass file in the home directory of "apache" user? PCP commands in pgpool-II 3.5 need this file. In addition, .pcppass must include passwords of the login users of pgpoolAdmin. PCP connection authentication: http://www.pgpool.net/docs/latest/pgpool-en.html#pcp_comand_password |
|
|
I'm also facing this problem. I have a .pcppass file in the httpd home directory (owned by apache user and with permissions 0600). The .pcppass file has inside the username:md5hash of the postgres user and the pgpool user. On my terminal as root (with the same .pcppass on the /root/ directory) if I use the -w flag it gives me : FATAL: authentication failed for user "postgres" DETAIL: username and/or password does not match. If I use the -W flag and manually insert the password it works. |
|
|
Thanks to anzai. He is right! Because I've installed packaged apache2 from Ubuntu repos, there is no home directory for web server user (www-data in my case). Also that fact causes posix_getpwuid() php function at 263 string of command.php return /var/www/.pcppass instead of /home/www-data/.pcppass as I expected. 1)I've created /home/www-data 2)usermod -d /home/www-data www-data 3)create .pcppass and fill it according to http://www.pgpool.net/docs/latest/pgpool-en.html#pcp_comand_password To hferreira: >The .pcppass file has inside the username:md5hash unfortunatelly the password in PLAIN text not in md5 hash... that's why it is required to set rw access ONLY to web server user (www-data in my case). To developers: 1) why is pgpool not using pcp.conf? 2) why is password in .pcppass in PLAIN text... not in md5? |
|
|
I'm on CentOS 7 so my apache user has a home directory set. (/usr/share/httpd) I changed the .pcppass file so now I have the password in plain text and it works. thanks @mikhail and @anzai. Maybe the documentation about .pcppass file should be a little more detailed with a working example for instance. Two other thungs I noticed. When installing PGPoolAdmin 3.5.1, the install check still asked me abou pcp_systemdb_info file. In the version selector I had 3.5 so it shouldn't check for that file. On the pgpool status page I have this: Login login user: postgres superuser: unknown (Connection error) I don't know if it's something I'm doing wrong |
|
|
>When installing PGPoolAdmin 3.5.1, the install check still asked me abou pcp_systemdb_info file. In the version selector I had 3.5 so it shouldn't check for that file. >On the pgpool status page I have this: Login login user: postgres superuser: unknown (Connection error) Agree with hferreira. I have same problems... |
|
|
Thanks for your advices. I'll deal with them. Is the message about pcp_systemdb_info even if you post the form? Each parameters are confirmed not when the selector is changed but only when the form is posted. |
|
|
>Is the message about pcp_systemdb_info even if you post the form? Yes, it is. Even if 'Check' button clicked, message 'pcp_systemdb_info command not found' is printed under 'PCP directory' field. |
|
|
Sorry, it was a bug. I thought I had tested with 3.5, but actually with the older version which had pcp_sytemdb_info command. I fixed this. Could you try this? http://git.postgresql.org/gitweb/?p=pgpooladmin.git;a=commitdiff;h=b3038f2102698bc1dbe7de216afb9300e35dd5de |
|
|
Fix helps. Thanks! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-04-05 18:33 | mikhail | New Issue | |
| 2016-04-07 07:50 | t-ishii | Assigned To | => anzai |
| 2016-04-07 07:50 | t-ishii | Status | new => assigned |
| 2016-04-07 14:01 | anzai | Note Added: 0000764 | |
| 2016-04-07 14:21 | anzai | Note Edited: 0000764 | |
| 2016-04-08 18:28 | hferreira | Note Added: 0000765 | |
| 2016-04-08 19:34 | mikhail | Note Added: 0000767 | |
| 2016-04-08 19:57 | hferreira | Note Added: 0000768 | |
| 2016-04-08 21:17 | mikhail | Note Added: 0000769 | |
| 2016-04-11 11:02 | anzai | Note Added: 0000770 | |
| 2016-04-11 15:40 | mikhail | Note Added: 0000773 | |
| 2016-04-11 15:53 | anzai | Note Added: 0000774 | |
| 2016-04-11 21:13 | mikhail | Note Added: 0000776 | |
| 2016-04-20 13:28 | t-ishii | Status | assigned => resolved |