Re: Missing or errooneous pg_hba.conf file

Lists: pgsql-admin
From: Bill Chandler <billybobc1210(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Missing or errooneous pg_hba.conf file
Date: 2004-05-19 20:28:34
Message-ID: 20040519202834.15105.qmail@web12903.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hello,

Running 7.4.2 on Solaris 8 (binaries were built on
a different Solaris 8 box).

I keep getting the following message when trying to
connect to server:

FATAL: missing or erroneous pg_hba.conf file
HINT: see server log for details.

Server log contains message:

LOG: invalid entry in pg_hba.conf file at line 60,
token "255.255.255.255"

The only change I've made was to postgresql.conf to
change "tcpip_socket = true". I have not modified
pg_hba.conf at all. Line 60 is the default 'host'
entry for 127.0.0.1. The token in question is the
IP-MASK field.

I have found that if I change this value to anything
other than "255.255.255.255" (e.g. "255.255.255.254")
the message goes away.

I get the same message if I add other lines with
IP-MASK=255.255.255.255 to the pg_hba.conf file.
It just doesn't seem to like '255.255.255.255' for
some reason.

I get the error using both the 'psql -h ...' command
and trying to connect via JDBC.

Incidentally, I saw the same problem running in 7.4.1.
I ended up just commenting out line 60 to get around
it. But now I need IP-MASK=255.255.255.255 so I
need to get it resolved. Interestingly the same 7.4.1
binary running on a different machine did not exhibit
the problem. Could it be a Solaris patch level
thing?

thanks in advance,

Bill
billybobc1210(at)yahoo(dot)com



__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Chandler <billybobc1210(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Missing or errooneous pg_hba.conf file
Date: 2004-05-19 21:16:26
Message-ID: 20717.1085001386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Bill Chandler <billybobc1210(at)yahoo(dot)com> writes:
> LOG: invalid entry in pg_hba.conf file at line 60,
> token "255.255.255.255"

> I have found that if I change this value to anything
> other than "255.255.255.255" (e.g. "255.255.255.254")
> the message goes away.

Bizarre. AFAICS this must indicate that getaddrinfo() is rejecting the
value, which perhaps could happen if some bit of it were miscoded to
use "-1" as a failure code.

> Interestingly the same 7.4.1 binary running on a different machine did
> not exhibit the problem. Could it be a Solaris patch level thing?

Seems likely. Can you update and see if that fixes it?

regards, tom lane


From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Missing or errooneous pg_hba.conf file
Date: 2004-05-19 22:32:52
Message-ID: m365ashwtn.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

After takin a swig o' Arrakan spice grog, tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) belched out:
> Bill Chandler <billybobc1210(at)yahoo(dot)com> writes:
>> LOG: invalid entry in pg_hba.conf file at line 60,
>> token "255.255.255.255"
>
>> I have found that if I change this value to anything
>> other than "255.255.255.255" (e.g. "255.255.255.254")
>> the message goes away.
>
> Bizarre. AFAICS this must indicate that getaddrinfo() is rejecting the
> value, which perhaps could happen if some bit of it were miscoded to
> use "-1" as a failure code.
>
>> Interestingly the same 7.4.1 binary running on a different machine did
>> not exhibit the problem. Could it be a Solaris patch level thing?
>
> Seems likely. Can you update and see if that fixes it?

Hmm... I think I have seen the same thing.

It went away when I substituted in some "grouped" entries, applying
policies to subnets rather than to individual hosts. That happened to
be a more appropriate model to use, as it cuts WAY down on the need
for pg_hba.conf entries, and on the need to modify configuration in
the future.

(We used to have, on test boxes, named IP addresses for people that
now get their IPs assigned by DHCP... Without subnet definitions,
that's a nightmare!)

We've got a box getting patched Saturday; I'll watch for that...
--
"cbbrowne","@","ntlug.org"
http://www3.sympatico.ca/cbbrowne/
Do Roman paramedics refer to IV's as "4's"?


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Missing or errooneous pg_hba.conf file
Date: 2004-05-19 23:58:24
Message-ID: 22657.1085011104@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Christopher Browne <cbbrowne(at)acm(dot)org> writes:
> After takin a swig o' Arrakan spice grog, tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) belched out:
>> Bill Chandler <billybobc1210(at)yahoo(dot)com> writes:
>>> Interestingly the same 7.4.1 binary running on a different machine did
>>> not exhibit the problem. Could it be a Solaris patch level thing?
>>
>> Seems likely. Can you update and see if that fixes it?

> Hmm... I think I have seen the same thing.

Interesting. I forgot to mention that a likely workaround (in 7.4.*
anyway) is to use CIDR-style specification of host+mask: "127.0.0.1/32"
instead of "127.0.0.1 255.255.255.255". That would avoid calling
getaddrinfo for the troublesome value. But it would be nice to verify
whether this is a Solaris bug or our own fault.

regards, tom lane


From: Bill Chandler <billybobc1210(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Missing or errooneous pg_hba.conf file
Date: 2004-05-20 21:41:34
Message-ID: 20040520214134.89785.qmail@web12907.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

I am in the process of having the Solaris 8 machine
upgrading w/ latest patches. I will let you know
if it fixes the problem.

Thanks.

Bill

--- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Bill Chandler <billybobc1210(at)yahoo(dot)com> writes:
> > LOG: invalid entry in pg_hba.conf file at line 60,
> > token "255.255.255.255"
>
> > I have found that if I change this value to
> anything
> > other than "255.255.255.255" (e.g.
> "255.255.255.254")
> > the message goes away.
>
> Bizarre. AFAICS this must indicate that
> getaddrinfo() is rejecting the
> value, which perhaps could happen if some bit of it
> were miscoded to
> use "-1" as a failure code.
>
> > Interestingly the same 7.4.1 binary running on a
> different machine did
> > not exhibit the problem. Could it be a Solaris
> patch level thing?
>
> Seems likely. Can you update and see if that fixes
> it?
>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 8: explain analyze is your friend



__________________________________
Do you Yahoo!?
Yahoo! Domains Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer


From: Bill Chandler <billybobc1210(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Missing or errooneous pg_hba.conf file
Date: 2004-05-24 16:28:22
Message-ID: 20040524162822.35072.qmail@web12902.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi all,

I had my Solaris 8 machine upgraded with latest
patches. No change. Still does not like
255.255.255.255. Using the alternate format of
IP-address/32 does fix the problem, though so glad to
have a workaround. Still it would be nice to know why
this happens on some systems and not on others.

Does anybody know of any system config parameters
that would affect this? Enironment variables? Config
files in /etc?

Very strange.

Thanks,

Bill
--- Bill Chandler <billybobc1210(at)yahoo(dot)com> wrote:
> I am in the process of having the Solaris 8 machine
> upgrading w/ latest patches. I will let you know
> if it fixes the problem.
>
> Thanks.
>
> Bill
>
> --- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Bill Chandler <billybobc1210(at)yahoo(dot)com> writes:
> > > LOG: invalid entry in pg_hba.conf file at line
> 60,
> > > token "255.255.255.255"
> >
> > > I have found that if I change this value to
> > anything
> > > other than "255.255.255.255" (e.g.
> > "255.255.255.254")
> > > the message goes away.
> >
> > Bizarre. AFAICS this must indicate that
> > getaddrinfo() is rejecting the
> > value, which perhaps could happen if some bit of
> it
> > were miscoded to
> > use "-1" as a failure code.
> >
> > > Interestingly the same 7.4.1 binary running on a
> > different machine did
> > > not exhibit the problem. Could it be a Solaris
> > patch level thing?
> >
> > Seems likely. Can you update and see if that
> fixes
> > it?
> >
> > regards, tom lane
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 8: explain analyze is your friend
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Domains Claim yours for only $14.70/year
> http://smallbusiness.promotions.yahoo.com/offer
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo(at)postgresql(dot)org



__________________________________
Do you Yahoo!?
Yahoo! Domains Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer