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
# ===================================================
#

# TYPE DATABASE USER CIDR-ADDRESS METHOD
local all all trust
host all all 127.0.0.1/32 trust

host all all 192.168.1.0/24 md5
host all all 172.20.0.0/18 md5

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

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

Cheers,
~p

--
Phillip Smith
phillips@fukawi2.homelinux.net

Search Discussions

  • Devrim GÃNDÃZ at Sep 25, 2007 at 11:46 am
    Hi,
    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.

    Regards,

    --
    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.
    127.0.0.1 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 :)
    ~p

    --
    Phillip Smith
    phillips@fukawi2.homelinux.net
    From pgsql-novice-owner@postgresql.org Wed Sep 26 15:33:33 2007
    Received: from localhost (unknown [200.46.204.184])
    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 ([200.46.204.71])
    by localhost (mx1.hub.org [200.46.204.184]) (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 [140.107.42.11])
    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 [140.107.164.66])
    by jarlite.fhcrc.org (8.12.11.20060308/8.12.11/SuSE 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 [10.6.164.22])
    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: 5.3.3.310218, Antispam-Engine: 2.5.2.313940, Antispam-Data: 2007.9.26.111341
    X-FHCRC-SCANNED: Wed Sep 26 11:33:26 2007
    X-FHCRC: WHITELISTED
    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.

    Mija

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedSep 25, '07 at 11:40a
activeSep 25, '07 at 10:59p
posts3
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

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

People

Translate

site design / logo © 2022 Grokbase