Univention Bugzilla – Bug 41915
no access to pykota postgresql database via localhost
Last modified: 2016-10-04 13:52:41 CEST
Creating the pg_hba.conf should configure "localhost" instead of "127.0.0.1" in /etc/univention/templates/files/etc/postgresql/9.1/main/pg_hba.conf.d/11-pg_hba.conf, in order to access the database via ipv4 and ipv6. The problem occurs in Ticket#2016080421000187 where the pykota-database could not be accessed via localhost but via 127.0.0.1 root@ucs:~# psql -h 127.0.0.1 -U pykotaadmin pykota psql (9.1.16) SSL-Verbindung (Verschlüsselungsmethode: DHE-RSA-AES256-SHA, Bits: 256) Geben Sie »help« für Hilfe ein. pykota=> root@ucs:/etc/postgresql# psql -U pykotaadmin -h localhost -W pykota Passwort für Benutzer pykotaadmin: psql: FATAL: Passwort-Authentifizierung f?r Benutzer >>pykotaadmin<< fehlgeschlagen FATAL: Passwort-Authentifizierung f?r Benutzer >>pykotaadmin<< fehlgeschlagen A restart of the nscd solved the problem in the first place
Workaround: replace "127.0.0.1" with "localhost" in conffiles/etc/postgresql/9.1/main/pg_hba.conf.d/11-pg_hba.conf
The workaround does not work. The new configuration causes the postgresql service to fail to start # service postgresql restart [....] Restarting PostgreSQL 9.1 database server: main[....] The PostgreSQL server failed to start. Please check the log output: 2016-08-10 10:22:38 CEST LOG: ung?ltige Authentifizierungsmethode >>255.255.255.255<< 2016-08-10 10:22:38 CEST ZUSAMMENHANG: Zeile 88 in Konfigurationsdatei >>/etc/postgresql/9.1/main/pg_hba.conf<< 2016-08-10 10:22:38 CEST LOG: ung?ltige Authentifizierungsmethode >>255.255.255.255<< 2016-08-10 10:22:38 CEST ZUSAMMENHANG: Zeile 89 in Konfigurationsda[FAIL>/etc/postgresql/9.1/main/pg_hba.conf<< 2016-08-10 10:22:38 CEST FATAL: konnte pg_hba.conf nicht laden ... failed! failed!
(In reply to Felix Botner from comment #1) > Workaround: > > replace "127.0.0.1" with "localhost" in > conffiles/etc/postgresql/9.1/main/pg_hba.conf.d/11-pg_hba.conf replace "127.0.0.1 255.255.255.255" with "localhost" it should look like this -> host pykota pykotaadmin localhost trust host pykota pykotauser localhost trust
univention-printquota (8.0.1-2) unstable; urgency=medium * PostgreSQL 9.1 supports host names in pg_hba.conf: change 127.0.0.1/32 to localhost, and thus add support for IPv6 (Bug #41915) Tests: OK Advisory: univention-printquota.yaml
OK - univention-printquotadb (localhost instead of 127.0.0.1 255.255.255.255 OK - YAML OK - merged to 4.2
<http://errata.software-univention.de/ucs/4.1/248.html>