pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRequire Assistance Solving Problem - erroneous pg_hba.conf
8+ messages / 5 participants
[nested] [flat]
* Require Assistance Solving Problem - erroneous pg_hba.conf
@ 2003-04-17 11:26 Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 14:40 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Tom Lane <tgl@sss.pgh.pa.us>
2003-04-17 16:53 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 8+ messages in thread
From: Greg Kelley @ 2003-04-17 11:26 UTC (permalink / raw)
To: pgsql-admin
After messing with this all week and getting nowhere, I'm ready to pay
someone to call me at 800-481-5022 ext 3005 to get this resolved ASAP. Our
online scheduling system has been down all week and the troops are ready to
revolt. Background:
A RedHat Upgrade Saturday from 8.0 to 9.0 just did a 'minor' version
upgrade from 7.3.1 to 7.3.2. However, I have not been able to get a
connection since
the upgrade. Postmaster loads fine, but I get:
FATAL: Missing or erroneous pg_hba.conf file, see postmaster log for details
Here is my pg_hba.conf file (from /var/lib/pgsql/data) that has always
worked:
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all
trust
host all all 127.0.0.1 255.255.255.255
trust
host all all 192.168.1.0 255.255.255.0
trust
host all all 24.128.216.179 255.255.255.255
md5
host all all 217.33.107.74 255.255.255.248
md5
I even reloaded the entire data directory from tape backup. Postgresql.conf
file is the
default - all lines commented out. Postmaster starts with:
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
/usr/bin/postmaster -o '-i -p ${PGPORT}' start > /var/log/pgsql 2>&1" <
/dev/null
(where $PGDATA is /var/lib/pgsql/data and $PGPORT is 5432)
pgsql log shows:
FATAL: Missing or erroneous pg_hba.conf file, see postmaster log for
details
"OG: parse_hba: invalid syntax in pg_hba.conf file at line 31, token "
Even the log entry doesn't look right - double quotes - and the .conf file
certainly doesn't have 31 lines!
Please call if you have any ideas how to fix this. Thanks.
________________________
Greg Kelley, IT Director
Britannic Aviation, US and UK
US Office:
Pease Int'l Tradeport
68 New Hampshire Ave.
Portsmouth, NH 03801
603.766.3005
http://www.britannicaviation.com
AOPA, EAA, SSA
CFII SEL, MEL; Comm Glider
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Require Assistance Solving Problem - erroneous pg_hba.conf
2003-04-17 11:26 Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
@ 2003-04-17 14:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-04-17 14:44 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Bruce Momjian <pgman@candle.pha.pa.us>
2003-04-17 23:15 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Mike Castle <dalgoda@ix.netcom.com>
1 sibling, 2 replies; 8+ messages in thread
From: Tom Lane @ 2003-04-17 14:40 UTC (permalink / raw)
To: Greg Kelley <gkelley@britannicaviation.com>; +Cc: pgsql-admin
"Greg Kelley" <gkelley@britannicaviation.com> writes:
> pgsql log shows:
> FATAL: Missing or erroneous pg_hba.conf file, see postmaster log for
> details
> "OG: parse_hba: invalid syntax in pg_hba.conf file at line 31, token "
> Even the log entry doesn't look right - double quotes - and the .conf file
> certainly doesn't have 31 lines!
Indeed. I think it's a Windows-newline issue: you probably edited the
config file with something that put in \r\n instead of \n. The
overstruck LOG is a dead giveaway...
I thought we had fixed the various config file parsers to be reasonably
impervious to stray \r's, but you may have found a corner case where
it's not recognized as whitespace. Try getting rid of the \r's.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Require Assistance Solving Problem - erroneous pg_hba.conf
2003-04-17 11:26 Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 14:40 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-04-17 14:44 ` Bruce Momjian <pgman@candle.pha.pa.us>
1 sibling, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2003-04-17 14:44 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Greg Kelley <gkelley@britannicaviation.com>; pgsql-admin
Tom Lane wrote:
> "Greg Kelley" <gkelley@britannicaviation.com> writes:
> > pgsql log shows:
>
> > FATAL: Missing or erroneous pg_hba.conf file, see postmaster log for
> > details
> > "OG: parse_hba: invalid syntax in pg_hba.conf file at line 31, token "
>
> > Even the log entry doesn't look right - double quotes - and the .conf file
> > certainly doesn't have 31 lines!
>
> Indeed. I think it's a Windows-newline issue: you probably edited the
> config file with something that put in \r\n instead of \n. The
> overstruck LOG is a dead giveaway...
>
> I thought we had fixed the various config file parsers to be reasonably
> impervious to stray \r's, but you may have found a corner case where
> it's not recognized as whitespace. Try getting rid of the \r's.
Also, please don't wait a week and have your users frustrated before
asking for assistance --- we are here to help.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Require Assistance Solving Problem - erroneous pg_hba.conf
2003-04-17 11:26 Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 14:40 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-04-17 23:15 ` Mike Castle <dalgoda@ix.netcom.com>
1 sibling, 0 replies; 8+ messages in thread
From: dalgoda@ix.netcom.com @ 2003-04-17 23:15 UTC (permalink / raw)
To: pgsql-admin
In article <10547.1050590455@sss.pgh.pa.us>,
Tom Lane <tgl@sss.pgh.pa.us> wrote:
>I thought we had fixed the various config file parsers to be reasonably
>impervious to stray \r's, but you may have found a corner case where
>it's not recognized as whitespace. Try getting rid of the \r's.
I hate to jump on band-wagons, but..... would switching to an XML based
config file be worth it?
I was also wondering how XML would work for dump/restore.
mrc
--
Mike Castle dalgoda@ix.netcom.com www.netcom.com/~dalgoda/
We are all of us living in the shadow of Manhattan. -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Require Assistance Solving Problem - erroneous pg_hba.conf
2003-04-17 11:26 Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
@ 2003-04-17 16:53 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-04-17 17:01 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 17:13 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Bruce Momjian <pgman@candle.pha.pa.us>
1 sibling, 2 replies; 8+ messages in thread
From: Tom Lane @ 2003-04-17 16:53 UTC (permalink / raw)
To: Greg Kelley <gkelley@britannicaviation.com>; +Cc: pgsql-admin@postgresql.org, Bruce Momjian <pgman@candle.pha.pa.us>; Joe Conway <mail@joeconway.com>
"Greg Kelley" <gkelley@britannicaviation.com> writes:
> A RedHat Upgrade Saturday from 8.0 to 9.0 just did a 'minor' version
> upgrade from 7.3.1 to 7.3.2.
> [ and broke his pg_hba.conf ]
Ah-hah, I now know where the behavioral change came from: the Red Hat
RPMs contain this patch:
inline patch 1: postgresql-7.3.2/src/backend/libpq/hba.c (+2/-0 lines) download inline-1.patch
--- postgresql-7.3.2/src/backend/libpq/hba.c.sopwith 2003-01-09 09:09:01.000000000 -0500
+++ postgresql-7.3.2/src/backend/libpq/hba.c 2003-01-09 09:09:09.000000000 -0500
@@ -72,11 +72,13 @@
* Some standard C libraries, including GNU, have an isblank() function.
* Others, including Solaris, do not. So we have our own.
*/
+#ifndef isblank
static bool
isblank(const char c)
{
return c == ' ' || c == '\t' || c == '\r';
}
+#endif
/*
which on RHL 9 causes the system definition of isblank() to be
substituted for Postgres'. That means \r is no longer treated as
whitespace, as it was in prior versions.
There is a fix in our CVS tree that prevents this problem and restores
the old treatment of \r, but for now you gotta get rid of the Windows-
style newlines.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Require Assistance Solving Problem - erroneous pg_hba.conf
2003-04-17 11:26 Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 16:53 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-04-17 17:01 ` Greg Kelley <gkelley@britannicaviation.com>
1 sibling, 0 replies; 8+ messages in thread
From: Greg Kelley @ 2003-04-17 17:01 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
Never had them that I can tell - created a new .conf file using vi so I know
it was clean as I was testing. Uninstall/reinstall RPMs worked - sort of.
Now I'm getting pgadmin-II to blow up saying:
2003-04-17 12:27:17 - Error in pgAdmin
II:frmConnect.cmdConnect_Click: -2147417848 - Automation error
The object invoked has disconnected from its clients.
and my php-pgsql is showing:
pg_exec() query failed: ERROR: Bad date external representation
(but this may be a version out of sync as I just installed the php-pgsql
DSO)
...so all still isn't well in dodge...
I can run psql, connect to the scheduler database, do a SELECT, etc.
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Greg Kelley" <gkelley@britannicaviation.com>
Cc: <pgsql-admin@postgresql.org>; "Bruce Momjian" <pgman@candle.pha.pa.us>;
"Joe Conway" <mail@joeconway.com>
Sent: 17 April, 2003 12:53 PM
Subject: Re: [ADMIN] Require Assistance Solving Problem - erroneous
pg_hba.conf
"Greg Kelley" <gkelley@britannicaviation.com> writes:
> A RedHat Upgrade Saturday from 8.0 to 9.0 just did a 'minor' version
> upgrade from 7.3.1 to 7.3.2.
> [ and broke his pg_hba.conf ]
Ah-hah, I now know where the behavioral change came from: the Red Hat
RPMs contain this patch:
--- postgresql-7.3.2/src/backend/libpq/hba.c.sopwith 2003-01-09
09:09:01.000000000 -0500
+++ postgresql-7.3.2/src/backend/libpq/hba.c 2003-01-09
09:09:09.000000000 -0500
@@ -72,11 +72,13 @@
* Some standard C libraries, including GNU, have an isblank() function.
* Others, including Solaris, do not. So we have our own.
*/
+#ifndef isblank
static bool
isblank(const char c)
{
return c == ' ' || c == '\t' || c == '\r';
}
+#endif
/*
which on RHL 9 causes the system definition of isblank() to be
substituted for Postgres'. That means \r is no longer treated as
whitespace, as it was in prior versions.
There is a fix in our CVS tree that prevents this problem and restores
the old treatment of \r, but for now you gotta get rid of the Windows-
style newlines.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Require Assistance Solving Problem - erroneous pg_hba.conf
2003-04-17 11:26 Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 16:53 ` Re: Require Assistance Solving Problem - erroneous pg_hba.conf Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-04-17 17:13 ` Bruce Momjian <pgman@candle.pha.pa.us>
1 sibling, 0 replies; 8+ messages in thread
From: Bruce Momjian @ 2003-04-17 17:13 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Greg Kelley <gkelley@britannicaviation.com>; pgsql-admin@postgresql.org, Joe Conway <mail@joeconway.com>
Yep, makes sense. This is clearly our bug because we overrode a
standard C function with one that didn't behave the same. My man page
says isblank tests only for space and tab, while we added \r to handle
DOS files cleanly.
---------------------------------------------------------------------------
Tom Lane wrote:
> "Greg Kelley" <gkelley@britannicaviation.com> writes:
> > A RedHat Upgrade Saturday from 8.0 to 9.0 just did a 'minor' version
> > upgrade from 7.3.1 to 7.3.2.
> > [ and broke his pg_hba.conf ]
>
> Ah-hah, I now know where the behavioral change came from: the Red Hat
> RPMs contain this patch:
>
> --- postgresql-7.3.2/src/backend/libpq/hba.c.sopwith 2003-01-09 09:09:01.000000000 -0500
> +++ postgresql-7.3.2/src/backend/libpq/hba.c 2003-01-09 09:09:09.000000000 -0500
> @@ -72,11 +72,13 @@
> * Some standard C libraries, including GNU, have an isblank() function.
> * Others, including Solaris, do not. So we have our own.
> */
> +#ifndef isblank
> static bool
> isblank(const char c)
> {
> return c == ' ' || c == '\t' || c == '\r';
> }
> +#endif
>
>
> /*
>
> which on RHL 9 causes the system definition of isblank() to be
> substituted for Postgres'. That means \r is no longer treated as
> whitespace, as it was in prior versions.
>
> There is a fix in our CVS tree that prevents this problem and restores
> the old treatment of \r, but for now you gotta get rid of the Windows-
> style newlines.
>
> regards, tom lane
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: Require Assistance Solving Problem - erroneous pg_hba
@ 2003-04-17 16:25 Murthy Kambhampaty <murthy.kambhampaty@goeci.com>
0 siblings, 0 replies; 8+ messages in thread
From: Murthy Kambhampaty @ 2003-04-17 16:25 UTC (permalink / raw)
To: Greg Kelley <gkelley@britannicaviation.com>; pgsql-admin
Greg Kelley [mailto:gkelley@britannicaviation.com] writes:
[snip]
>... Postmaster starts with:
>
>su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p
>/usr/bin/postmaster -o '-i -p ${PGPORT}' start > /var/log/pgsql 2>&1" <
>/dev/null
you might want to change your start line to
su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -D $PGDATA -p \
/usr/bin/postmaster -o '-i -p ${PGPORT}' start >> /var/log/pgsql \
2>&1" </dev/null
note the >> /var/log/pgsql, which appends to the file -- creating it if
necessary -- rather than replacing it each time you start the postmaster, as
it is now set to do. See, the Advanced Bash Scripting Guide, particularly
http://www.tldp.org/LDP/abs/html/io-redirection.html
on this.
(Server log rotation is a topic continually discussed on this list; you
might want to look into it.)
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2003-04-17 23:15 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-17 11:26 Require Assistance Solving Problem - erroneous pg_hba.conf Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 14:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-04-17 14:44 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-04-17 23:15 ` Mike Castle <dalgoda@ix.netcom.com>
2003-04-17 16:53 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-04-17 17:01 ` Greg Kelley <gkelley@britannicaviation.com>
2003-04-17 17:13 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-04-17 16:25 Re: Require Assistance Solving Problem - erroneous pg_hba Murthy Kambhampaty <murthy.kambhampaty@goeci.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox