Hi all,

Not sure what I've done (an automatic yum update I suspect!) but my Drupal
site recently died. Traced the problem back to this error in PostgreSQL:
ESTLOG: connection received: host=::1 port=37822
ESTFATAL: no pg_hba.conf entry for host "::1", user "drupal", database "drupal", SSL off

This PostgreSQL server purely exists these days to run Drupal, and I
haven't touched the config since I set it up - I suspect a yum update
changed something to do with the way Apache or PHP talks to PG. I compiled
PG from source so yum hasn't touched PG.

Here's my pg_hba.conf:
[root@poweredge2400 data]# cat pg_hba.conf
# PostgreSQL Client Authentication Configuration File
# ===================================================

local all all trust
host all all trust

host all all md5
host all all md5

I've managed to get my site running again by telling it to connect to PG
via the interface instead of 'localhost'

If I su to 'apache' and run 'psql drupal drupal' it connects fine. What's
been buggered up?


Phillip Smith

Search Discussions

  • Devrim GÃNDÃZ at Sep 25, 2007 at 11:46 am
    On Tue, 2007-09-25 at 22:39 +1000, Phillip Smith wrote:
    ESTFATAL: no pg_hba.conf entry for host "::1", user "drupal",
    database "drupal", SSL off
    You need to enable IPV6 in pg_hba.conf:

    host drupal drupal ::1/128 trust

    and reload PostgreSQL.


    Devrim GÜNDÜZ
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support
    Managed Services, Shared and Dedicated Hosting
    Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/
  • Phillip Smith at Sep 25, 2007 at 10:59 pm

    On Tue, 25 Sep 2007, Devrim GÜNDÜZ wrote:

    You need to enable IPV6 in pg_hba.conf:

    host drupal drupal ::1/128 trust
    I thought it was something like that... Now that's I've taken a second
    look, it seems the yum update did this to /etc/hosts:
    [phillips@poweredge2400 ~]$ cat /etc/hosts
    # Do not remove the following line, or various programs
    # that require network functionality will fail. poweredge2400 localhost.localdomain localhost
    ::1 poweredge2400 localhost.localdomain localhost

    So localhost resolved according to the last line to the IPv6 address,
    instead of the IPv4 address.

    Thanks :)

    Phillip Smith
    From pgsql-novice-owner@postgresql.org Wed Sep 26 15:33:33 2007
    Received: from localhost (unknown [])
    by postgresql.org (Postfix) with ESMTP id 59DBD9F97FF
    for <pgsql-novice-postgresql.org@postgresql.org>; Wed, 26 Sep 2007 15:33:33 -0300 (ADT)
    Received: from postgresql.org ([])
    by localhost (mx1.hub.org []) (amavisd-maia, port 10024)
    with ESMTP id 56063-06 for <pgsql-novice-postgresql.org@postgresql.org>;
    Wed, 26 Sep 2007 15:33:26 -0300 (ADT)
    X-Greylist: from auto-whitelisted by SQLgrey-1.7.5
    Received: from jarlite.fhcrc.org (JARLITE.FHCRC.ORG [])
    by postgresql.org (Postfix) with ESMTP id 611A89F96B2
    for <pgsql-novice@postgresql.org>; Wed, 26 Sep 2007 15:33:28 -0300 (ADT)
    Received: from brood2.pc.scharp.org (HIVEXT-A.SCHARP.ORG [])
    by jarlite.fhcrc.org ( Linux 0.7) with ESMTP id l8QIXD1t011209;
    Wed, 26 Sep 2007 11:33:13 -0700
    Received: from brood2.pc.scharp.org (brood2.pc.scharp.org [])
    by brood2.pc.scharp.org (8.12.10+Sun/8.11.6) with SMTP id l8QIX0ka008728;
    Wed, 26 Sep 2007 11:33:11 -0700 (PDT)
    Message-Id: <200709261833.l8QIX0ka008728@brood2.pc.scharp.org>
    Date: Wed, 26 Sep 2007 11:33:01 -0700 (PDT)
    From: Mija Lee <mija@scharp.org>
    Reply-To: Mija Lee <mija@scharp.org>
    Subject: Re: Could not remove file messages
    To: tgl@sss.pgh.pa.us
    Cc: pgsql-novice@postgresql.org
    MIME-Version: 1.0
    Content-Type: TEXT/plain; charset=us-ascii
    Content-MD5: sOGwIrBfObd6YY5EfX7qKg==
    X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.5.5 SunOS 5.9 sun4u sparc
    X-PMX-Version:, Antispam-Engine:, Antispam-Data: 2007.9.26.111341
    X-FHCRC-SCANNED: Wed Sep 26 11:33:26 2007
    X-Virus-Scanned: Maia Mailguard 1.0.1
    X-Archive-Number: 200709/109
    X-Sequence-Number: 19439

    Hi -

    I just wanted to follow up on this. We've recently upgraded to 8.2.4. I still
    get this message and the empty subdirectories with the later version of
    postgres. I have seen the .nfs files temporarily in the subdirectories that
    remain so I am sure that you are right about the cause, Tom.

    Unless you know that this is being worked on for the next version of postgres, I
    think I'll just write a script that removes empty subdirectories from the pgdata
    dir that are more than a week old or so, unless you think this is a bad idea.


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
postedSep 25, '07 at 11:40a
activeSep 25, '07 at 10:59p

2 users in discussion

Phillip Smith: 2 posts Devrim GÃNDÃZ: 1 post



site design / logo © 2022 Grokbase