0

I experiencing some problems with PostgreSQL that i need to install to run a SIlverpeas project.

Normally, the postgres part is correctly configured, because i've sent a command to make the user silverpeas owner of the database silverpeas, and i can connect by ssh using "pgsql -U silverpeas silverpeas"

Now, i'm trying to make my phpPgAdmin work. He is on the same server Centos 6.7 than Postgresql (in version 9.5).

When i'm trying to connect, i have a connection failed message, and sometimes, when i'm trying to troubleshoot the problem, i have the "trying to hack your system" message.

When i'm looking for the pgsql log file, after a connection trial, i have this 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"

The problem is, my /var/lib/pgsql/9.5/data/pg_hba.conf is like this :

# 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

And if i looked for the /var/lib/pgsql/9.5/data/postgresql.conf file :

listen_addresses = 'localhost'

And my phpPgAdmin configuration is :

// 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';

Suggestions ?

Nicolas Frbezar
  • 497
  • 1
  • 5
  • 24

1 Answers1

0

The pg_hba.conf file doesn't match the log file. You use md5 method (good) but the log file talks about ident method.

Have you change and reload your postgresql conf before ?

SilverDav
  • 16
  • 1