View Issue Details

IDProjectCategoryView StatusLast Update
0000252Pgpool-IIBugpublic2016-10-18 20:36
ReporternagataAssigned ToMuhammad Usama 
Status resolvedResolutionfixed 
Product Version3.6.0 
Target VersionFixed in Version 
Summary0000252: authentication failed error when PCP command is cancelled by other pgpool
DescriptionWith watchdog, when I run pcp_attach_node command and the request is cancelled by other pgpool because failover is in progress in the other node, the pcp command fails (this expected) and "authentication failed" error appears in log messages, though it has no relation with authentication.

Steps To ReproduceYou can reproduce this artificially by the following patch, which makes wd_send_failback_request() return COMMAND_FAILED.

+++ b/src/watchdog/wd_commands.c
@@ -432,6 +433,8 @@ wd_send_failback_request(int node_id)
        char* func;
        unsigned int *shared_key = get_ipc_shared_key();
        /* if failback packet is received already, do nothing */
        if (wd_chk_node_mask_for_failback_req(&n,1))
                return COMMAND_OK;

Run the following command

$ pcp_attach_node 0

Then, pgpool log says "FAITAL: authentication failed ..."

2016-10-11 10:23:36: pid 20035: LOG: received failback request for node_id: 0 from pid [20035]
2016-10-11 10:23:36: pid 20035: ERROR: failback request for node_id: 0 from pid [20035] is canceled by other pgpool
2016-10-11 10:23:36: pid 20035: FATAL: authentication failed for new PCP connection
2016-10-11 10:23:36: pid 20035: DETAIL: connection not authorized
TagsNo tags attached.


Muhammad Usama

2016-10-18 20:36

developer   ~0001119


Thanks for the report I have pushed the fix in 3.5 and master branches;a=commitdiff;h=878a986d6d4e115a4af889a802aa90bcda3deb13

Issue History

Date Modified Username Field Change
2016-10-11 10:39 nagata New Issue
2016-10-17 16:31 t-ishii Assigned To => Muhammad Usama
2016-10-17 16:31 t-ishii Status new => assigned
2016-10-18 20:36 Muhammad Usama Status assigned => resolved
2016-10-18 20:36 Muhammad Usama Resolution open => fixed
2016-10-18 20:36 Muhammad Usama Note Added: 0001119