View Issue Details

IDProjectCategoryView StatusLast Update
0000132Pgpool-IIBugpublic2015-04-17 04:27
Reporterggerhardt Assigned ToMuhammad Usama  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionno change required 
PlatformlinuxOSCentos OS Version6.6
Summary0000132: Cannot connect using -h localhost with pgpool 3.4.2
DescriptionI cannot connect to the postgres database via pgpool when using the "-h localhost" parameter.
I get the error that the pg_hba.conf file does not have an entry for ::1
when in fact there is an entry in the pg_hba.conf file for that address.

Workaround: removing the ::1 address from the /etc/hosts file does get around this, but this is not a long term workaround.
Steps To Reproduce
This line is in the pg_hba.conf file:
host all all ::1/128 trust

The /etc/hosts file has these lines:
127.0.0.1 galerella localhost localhost.localdomain
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Now if I attempt to connect to postgres via the pgpool using the -h localhost
parameter, I get errors

  [azuki@galerella config]$ psql -U postgres mongoose_production -p 5432 -h localhost
  psql: FATAL: client authentication failed
  DETAIL: no pool_hba.conf entry for host "::1", user "postgres", database "mongoose_production", SSL on
  HINT: see pgpool log for details
  FATAL: client authentication failed
  DETAIL: no pool_hba.conf entry for host "::1", user "postgres", database "mongoose_production", SSL off
  HINT: see pgpool log for details

Connecting with -h 127.0.0.1, no problem see:
  [azuki@galerella config]$ psql -U postgres mongoose_production -p 5432 -h 127.0.0.1
  psql (9.3.1)
  SSL connection (cipher: AES256-SHA, bits: 256)
  Type "help" for help.

  mongoose_production=# \q

Connecting without the -h, no problems seen:
  [azuki@galerella config]$ psql -U postgres mongoose_production -p 5432
  psql (9.3.1)
  Type "help" for help.

  mongoose_production=# \q

Connecting with -h ::1, problem is seen:
  [azuki@galerella config]$ psql -U postgres mongoose_production -p 5432 -h ::1
  psql: FATAL: client authentication failed
  DETAIL: no pool_hba.conf entry for host "::1", user "postgres", database "mongoose_production", SSL on
  HINT: see pgpool log for details
  FATAL: client authentication failed
  DETAIL: no pool_hba.conf entry for host "::1", user "postgres", database "mongoose_production", SSL off
  HINT: see pgpool log for details
  [azuki@galerella config]$

Additional InformationConnecting to the postgres database via port 5434, these issues are not seen.

[azuki@galerella config]$ psql -U postgres mongoose_production -p 5434
psql (9.3.1)
Type "help" for help.

mongoose_production=# \q
[azuki@galerella config]$ psql -U postgres mongoose_production -p 5434 -h localhost
psql (9.3.1)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

mongoose_production=# \q
[azuki@galerella config]$ psql -U postgres mongoose_production -p 5434 -h ::1
psql (9.3.1)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

mongoose_production=# \q
[azuki@galerella config]$ psql -U postgres mongoose_production -p 5434 -h 127.0.0.1
psql (9.3.1)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

mongoose_production=# \q
TagsNo tags attached.

Activities

Muhammad Usama

2015-04-11 03:37

developer   ~0000526

This seems to be a pool_hba.conf configuration issue.
The mentioned error suggests that the connection to the pgpool-II is explicitly rejected, Either it is rejected because of an entry in pool_hba.conf file or the more likely case is there is no matching entry in pool_hba.conf file corresponding to a local IPV6 connection.

Please review the pool_hba.conf file and put the entry for local IPV6 connections,
host all all ::1/128 trust

ggerhardt

2015-04-11 03:42

reporter   ~0000527

As stated in the initial text of the bug, that line was in the pg_hba.conf file when this problem was seen.

Muhammad Usama

2015-04-11 03:47

developer   ~0000528

pg_hba.conf file is for PostgreSQL, You need to put the same line in pool_hba.conf file that controls the client authentication for pgpool-II

ggerhardt

2015-04-17 00:28

reporter   ~0000529

Yeah, ok. Misconfig on my side. Sorry. You can close this defect.

Issue History

Date Modified Username Field Change
2015-04-10 23:39 ggerhardt New Issue
2015-04-11 03:37 Muhammad Usama Note Added: 0000526
2015-04-11 03:42 ggerhardt Note Added: 0000527
2015-04-11 03:47 Muhammad Usama Note Added: 0000528
2015-04-17 00:28 ggerhardt Note Added: 0000529
2015-04-17 04:27 Muhammad Usama Status new => closed
2015-04-17 04:27 Muhammad Usama Assigned To => Muhammad Usama
2015-04-17 04:27 Muhammad Usama Resolution open => no change required