Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed both pgpool and postgresql via apt.

In pgpool.conf, I have made the changes necessary to use replication mode, as well as my two postgresql databases (currently all running on the same host).

I am unable to figure out what I need to add to my pg_hba.conf files in order to have pgpool connect to them. I keep getting this error

createdb: could not connect to database postgres: ERROR:  MD5 authentication 
is unsupported in replication, master-slave and parallel modes.
HINT:  check pg_hba.conf

both of my pg_hba.conf files look like

local   all             postgres                                peer

local   all             all                                     peer
local   all             postgres                                md5

host    all             all             127.0.0.1/32            md5

host    all             all             ::1/128                 md5

local   replication     postgres                                peer
host    replication     postgres        127.0.0.1/32            md5

and my pool_hba.conf looks like

local   all         all                               trust
local   all         postgres                          md5
local   all         all                               md5     

host    all         all         127.0.0.1/32          trust

What am I missing in order to have pgpool connect to my databases?

share|improve this question
    
You are executing createdb. Please try a simple psql connection first. I went through some issues while trying to set up pgpool with replication and made a note of the debugging process I used - sraoss.jp/pipermail/pgpool-general/2013-May/001773.html – Jayadevan Feb 11 '14 at 3:50

It looks like your default authentication mode for TCP/IP connections (host) is md5. So at a guess, you have PgPool connecting over TCP/IP.

Change the auth mode for loopback connections on tcp/ip, or use unix sockets with pgpool (usually by omitting the host setting).

If you're still stuck after reading:

19.1. The pg_hba.conf File and
Chapter 19. Client Authentication

in the PostgreSQL 9.4 documentation, and you can't find answers elsewhere (there are lots of related questions on Stack Overflow), let me know and I'll give you a step by step if I have a chance.

share|improve this answer

I messed around with this problem for several hours and then finally found the solution.

Read the pgpool-II FAQ and look at the table:

Referenced Table

You cannot leave the default entries of trust in pool_hba.conf. I commented out the trust entries and added my md5 entries.

share|improve this answer

As an additional check, after ensuring matching MD5 METHODS in pg_hba.conf and pool_hba.conf,

make sure to set

 enable_pool_hba = on 

in pgpool.conf

share|improve this answer

I was also facing same issue. I just do some setting in pool_hba.conf and add md5 encrypted password in pcp.confi & pool_passwd file after that reload the pool setting and start it again. After these setting. MY application is working fine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.