Ce fichier ne correspond pas au message d'erreur.
J'imagine que vous avez modifié le fichier tel que vous nous l'avez envoyé et que vous n'avez pas relancé le serveur (ou fait un reload de la conf) ?
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all 10.1.1.0/8 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident
silverpeas=# select name, setting from pg_settings where name ='hba_file';
name | setting
----------+-------------------------------------
hba_file | /var/lib/pgsql/9.5/data/pg_hba.conf
(1 row)
Ok intéressant, comment y remedier ?
]]>Avec psql, que vous renvoie : select name, setting from pg_settings where name ='hba_file';
le chemin retourné correspond t'il à l'endroit où vous cherchez votre pg_hba.conf ?
]]>Je rencontre des problèmes avec phpPgAdmin, que j'ai besoin d'avoir en association avec PostgreSQL pour lancer un projet Silverpeas.
Normallement, le serveur Postgresql est correctement configuré puisque que j'ai pus crée un identifiant silverpeas, creer sa base de donnée propriétaire et m'y connecter en utilisant la commande "pgsql -U silverpeas silverpeas".
Maintenant, je veux faire tourner phpPgAdmin, sur le même serveur Centos 6.7 que Postgresql (version 9.5).
Quand je veux me connecter, j'ai un message d'echec, et quand je fais des tests pour modifier la conf, quelque fois, il m'oindique que j'attaque le systèmes.
Quand je regarde les logs de PGSQL après une tentative de connection, j'ai ce message :
< 2016-03-16 11:32:39.378 CET >LOG: could not connect to Ident server at address "::1", port 113: Connection refused
< 2016-03-16 11:32:39.378 CET >FATAL: Ident authentication failed for user "silverpeas"
< 2016-03-16 11:32:39.378 CET >DETAIL: Connection matched pg_hba.conf line 84: "host all all ::1/128 ident"
Mais, mon /var/lib/pgsql/9.5/data/pg_hba.conf ressemble à ça :
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all 10.1.1.0/8 md5
Et j'ai cherché pour le fichier /var/lib/pgsql/9.5/data/postgresql.conf:
listen_addresses = 'localhost'
Et phpPgAdmin est configuré comme çi :
// use 'localhost' for TCP/IP connection on this computer
$conf['servers'][0]['host'] = 'localhost';
// Database port on server (5432 is the PostgreSQL default)
$conf['servers'][0]['port'] = 5432;
// Database SSL mode
// Possible options: disable, allow, prefer, require
// To require SSL on older servers use option: legacy
// To ignore the SSL mode, use option: unspecified
$conf['servers'][0]['sslmode'] = 'allow';
// Change the default database only if you cannot connect to template1.
// For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
$conf['servers'][0]['defaultdb'] = 'silverpeas';
Que faire ?
]]>