[Pgpool-hackers] Facing MD5 related problem with pgpool

Gurjeet Singh singh.gurjeet at gmail.com
Wed Jul 20 21:43:06 UTC 2011


Hi,

    I am trying to use pgpool-II version 3.0.3 in master/slave mode, using
streaming replication, and am running it like so:

$ ./bin/pgpool --version
pgpool-II version 3.0.3 (umiyameboshi)

$ ./bin/pgpool -f etc/pgpool.conf -a etc/pool_hba.conf -F etc/pcp.conf -n

Am attaching the three configuration files being used above, and also the
pool_passwd file generated using `pg_md5 -m` for OS user named enterprisedb.

I have 2 instances of Postgres (actually, EnterpriseDB's Advanced Server
9.0) running on port 5444 and 5445, and that is reflected in the pgpool.conf
file settings backend_hostname{0|1}. Also attaching the pg_hba.conf of
instance running on port 5444.

Now I am trying to connect to the pgpool using the following command, but am
facing an error:

$ psql -p 9999 -U enterprisedb -h localhost
psql: ERROR:  MD5 authentication is unsupported in replication, master-slave
and parallel modes.
HINT:  check pg_hba.conf

I have tried to change the last line in pool_hba.conf to trust and even that
lead to the same error messsage. I tried to debug the issue, and attached a
debugger with following results.

The error is being raised from pg_do_auth() function:

    else if (authkind == 5)
    {
        /* If MD5 auth is not active in pool_hba.conf, it cannot be
         * used with other than raw mode.
         */
        if (frontend->auth_method != uaMD5 && !RAW_MODE && NUM_BACKENDS > 1)
        {
            pool_send_error_message(frontend, protoMajor,
AUTHFAIL_ERRORCODE,
                                    "MD5 authentication is unsupported in
replication, master-slave and parallel modes.",
                                    "",
                                    "check pg_hba.conf",
                                    __FILE__, __LINE__);
            return -1;
        }
        ......

Upon entry in the function, the frontend->auth_method is set to uaReject and
hence the error.

frontend->auth_method = uaReject

How can I successfully connect to master instance through PGPool using md5
authentication?

Any help is greatly appreciated.

Thanks,
-- 
Gurjeet Singh
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110720/512ea340/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool.conf
Type: application/octet-stream
Size: 9800 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110720/512ea340/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pool_hba.conf
Type: application/octet-stream
Size: 3336 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110720/512ea340/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcp.conf
Type: application/octet-stream
Size: 895 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110720/512ea340/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pool_passwd
Type: application/octet-stream
Size: 89 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110720/512ea340/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pg_hba.conf
Type: application/octet-stream
Size: 3752 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110720/512ea340/attachment-0009.obj>


More information about the Pgpool-hackers mailing list