View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000239 | Pgpool-II | Bug | public | 2016-08-29 21:21 | 2021-04-08 20:18 |
| Reporter | supp_k | Assigned To | Muhammad Usama | ||
| Priority | high | Severity | major | Reproducibility | always |
| Status | assigned | Resolution | open | ||
| Platform | Intel x86 64 | OS | CentOS | OS Version | 7.x |
| Product Version | 3.5.3 | ||||
| Summary | 0000239: invalid pcp socket directory | ||||
| Description | The pgpool.conf has the following setting: pcp_port = 9898 pcp_socket_dir = '/var/run/pgpool' But when I run the command: -bash-4.2$ pcp_watchdog_info I see the error: ERROR: connection to socket "/tmp/.s.PGSQL.9898" failed with error "No such file or directory" I see the "pcp_socket_dir" parameter is ignored: | ||||
| Tags | No tags attached. | ||||
|
|
All PCP client side tools are independent of pgpool server side settings/configurations and have no visibility and access to the pgpool.conf file, Since the utility can be used to connect to any local or remote pgpool server, So pcp utilities always try to connect on the default socket directory and default port unless explicitly specified in the command's argument. |
|
|
Muhammad, how can I specify the port and the socket directory when execute PCP utilities? |
|
|
When using unix domin sockets hostname (-h) is used to specify the socket directory For example: # with pcp_port = 9898 and pcp_socket_dir = '/var/run/pgpool' pcp_pool_status -h /var/run/pgpool -p 9898 -U <user> |
|
|
The --help switch says -h parameter is used to pass the hostname but not directory. Is it ok? # pcp_watchdog_info --help pcp_watchdog_info - display a pgpool-II watchdog's information Usage: pcp_watchdog_info [OPTION...] [watchdog-id] Options: -U, --username=NAME username for PCP authentication -h, --host=HOSTNAME pgpool-II host -p, --port=PORT PCP port number -w, --no-password never prompt for password -W, --password force password prompt (should happen automatically) -n, --watchdog-id=ID ID of a other pgpool to get information for ID 0 for the local watchdog If omitted then get information of all watchdog nodes -d, --debug enable debug message (optional) -v, --verbose output verbose messages -?, --help print this help When I pass the socket dir I receive an error: ERROR: could not retrieve hostname. gethostbyname failed with error "SUCCESS" |
|
|
...I could pass the "localhost" like #pcp_watchdog_info -h localhost .. |
|
|
You are right the --help needs a better description And regarding as error: what version of pgpool-II you are using. Can you paste the complete command that produces an error. I just checked it again and it works fine. [usama@localhost bin]$ ./pcp_watchdog_info -h /home/usama/work/installed/pgpool -p 9891 -U postgres 1 Password: ERROR: PCP: informing watchdog info failed DETAIL: watcdhog is not enabled [usama@localhost bin]$ ./pcp_node_info -h /home/usama/work/installed/pgpool -p 9891 -U postgres 1 Password: 127.0.0.1 5434 2 0.333333 up |
|
|
Here I see some strange behavior. If I call # pcp_watchdog_info -h /var/run/pgpool utils using command line then it works OK. But is call it using sh file then I receive the error: ERROR: could not retrieve hostname. gethostbyname failed with error "SUCCESS" The version number which I use is: $ pgpool --version pgpool-II version 3.6-alpha1 (subaruboshi) Finally I think we will go with the solution: # pcp_watchdog_info -h 127.0.0.1 |
|
|
Thank you for the help! |
|
|
The issue is randomly reproduced in Pgpool 3.6.5: [root@headpgpool]# pcp_watchdog_info -h 127.0.0.1 Password: ERROR: PCP: informing watchdog info failed DETAIL: invalid watchdog index |
|
|
Also randomly the execution of "pcp_watchdog_info" command hangs in case the pgpool cluster lost one of pgpool nodes. |
|
|
Result of the strace command for the being hanged process: [root@headpgpool]# strace -p 11680 Process 11680 attached connect(9, {sa_family=AF_LOCAL, sun_path="/var/run/pgpool/.s.PGPOOLWD_CMD.9000"}, 110 [root@headpgpool]# ls -lah /var/run/pgpool/.s.* srwxr-xr-x 1 pgpool pgpool 0 Aug 11 15:44 /var/run/pgpool/.s.PGPOOLWD_CMD.9000 srwxrwxrwx 1 pgpool pgpool 0 Aug 11 15:44 /var/run/pgpool/.s.PGSQL.5432 srwxrwxrwx 1 pgpool pgpool 0 Aug 11 15:44 /var/run/pgpool/.s.PGSQL.9898 |
|
|
I Was facing below issue and reload of pgpool services has resolved my problem. [postgres@ /]$ pcp_attach_node -n 0 Password: ERROR: connection to socket "/tmp/.s.PGSQL.9898" failed with error "No such file or directory" [postgres@ /tmp]$ pgpool -f /etc/pgpool-II-11/pgpool.conf -F /etc/pgpool-II-11/pcp.conf reload |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-08-29 21:21 | supp_k | New Issue | |
| 2016-08-30 00:13 | Muhammad Usama | Note Added: 0001030 | |
| 2016-08-30 00:25 | supp_k | Note Added: 0001031 | |
| 2016-08-30 00:31 | Muhammad Usama | Note Added: 0001032 | |
| 2016-08-30 00:37 | supp_k | Note Added: 0001033 | |
| 2016-08-30 00:38 | supp_k | Note Added: 0001034 | |
| 2016-08-30 00:54 | Muhammad Usama | Note Added: 0001035 | |
| 2016-08-30 01:45 | supp_k | Note Added: 0001036 | |
| 2016-08-30 07:38 | t-ishii | Assigned To | => Muhammad Usama |
| 2016-08-30 07:38 | t-ishii | Status | new => assigned |
| 2016-08-31 01:40 | supp_k | Note Added: 0001037 | |
| 2017-08-11 23:00 | supp_k | Note Added: 0001642 | |
| 2017-08-11 23:02 | supp_k | Note Added: 0001643 | |
| 2017-08-11 23:13 | supp_k | Note Added: 0001644 | |
| 2021-04-08 20:18 | moin | Note Added: 0003799 |