FATAL: Ident authentication failed for user “xyzw” (PG::ConnectionBad)

But according to pg_hba.conf I am not connecting using ident on localhost:

host all all 127.0.0.1/32 md5

or am I?

host all all ::1/128 ident

Because you know, ::1 is localhost also and you can easily overlook this. Never forget IPv6 even when dealing with localhost.

2 thoughts on “FATAL: Ident authentication failed for user “xyzw” (PG::ConnectionBad)

  1. Actually, on RHEL family distros only 127.0.0.1 is localhost by default. ::1 is localhost6.

    [stsimb@zm-in-01 ~]$ grep localhost /etc/hosts
    127.0.0.1       localhost.localdomain localhost
    ::1             localhost6.localdomain6 localhost6
    

    But this has backfired on me too, some milter expected that localhost would get it to connect to ::1, but it didn’t (ref).

Leave a reply to adamo Cancel reply