Thread: pg_hba.conf
I am putting up a new server on version 8.4.3. I copied pg_hba.conf from a running 8.3.6 system, changing only the public IP address for the local machine. I get the error: FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres", database "arc" pg_hba.conf contains the line: host all all 209.159.145.248 255.255.255.255 trust Other records work (I can connect from my remote site using pgAdmin, just fine), so I know the file is being read by posgres. Any ideas? Thanks in advance, Jim
On 27/04/2010 11:42, jkunkel@laurcat.com wrote: > I am putting up a new server on version 8.4.3. I copied pg_hba.conf > from a running 8.3.6 system, changing only the public IP address for the > local machine. > > I get the error: > FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres", > database "arc" > > pg_hba.conf contains the line: > host all all 209.159.145.248 255.255.255.255 > trust Would there be a line earlier in the file that matches and is preventing a connection? Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie
Hi >Would there be a line earlier in the file that matches and is preventing >a connection? At first, I think so too. But if there is a line earlier in the file ,we get following error. ------------------------------------------------------------------------ psql: could not connect to server: Connection refused Is the server running on host "192.168.23.132" and accepting TCP/IP connections on port 1843? ------------------------------------------------------------------------ ex: my pg_hba.conf ------------------------------------------------------------------------ host all all 192.168.23.132 255.255.255.255 deny host all all 192.168.23.132 255.255.255.255 trust ------------------------------------------------------------------------ The Jim's message say pg_hba.conf has no entory. ------------------------------------------------------------------------ FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres", database "arc" ------------------------------------------------------------------------ 1)Is pg_hba.conf's location correct? You can check to execute this command. postgres=# show hba_file; hba_file ------------------------------- /home/p843/pgdata/pg_hba.conf (1 row) 2)Did you reload pg_hba.conf? If we change pg_hba.conf ,we must execute "pg_ctl reload" 3)pg_hba.conf may have a trash. Can you recreate pg_hba.conf? *Don't copy old pg_hba.conf. Thank you. > On 27/04/2010 11:42, jkunkel@laurcat.com wrote: > >> I am putting up a new server on version 8.4.3. I copied pg_hba.conf >> from a running 8.3.6 system, changing only the public IP address for the >> local machine. >> >> I get the error: >> FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres", >> database "arc" >> >> pg_hba.conf contains the line: >> host all all 209.159.145.248 255.255.255.255 >> trust >> > Would there be a line earlier in the file that matches and is preventing > a connection? > > Ray. > > -- ================================================ Kenichiro Tanaka K.K.Ashisuto http://www.ashisuto.co.jp/english/index.html ================================================
I've had problems before with the listen_addresses and had to set it accordingly. Wouldn't accept connections locally.
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432
> Date: Tue, 27 Apr 2010 21:08:31 +0900
> From: ketanaka@ashisuto.co.jp
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] pg_hba.conf
>
> Hi
>
> >Would there be a line earlier in the file that matches and is preventing
> >a connection?
>
> At first, I think so too.
> But if there is a line earlier in the file ,we get following error.
>
> ------------------------------------------------------------------------
> psql: could not connect to server: Connection refused
> Is the server running on host "192.168.23.132" and accepting
> TCP/IP connections on port 1843?
> ------------------------------------------------------------------------
>
> ex: my pg_hba.conf
> ------------------------------------------------------------------------
> host all all 192.168.23.132 255.255.255.255 deny
> host all all 192.168.23.132 255.255.255.255 trust
> ------------------------------------------------------------------------
>
>
> The Jim's message say pg_hba.conf has no entory.
>
> ------------------------------------------------------------------------
> FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres",
> database "arc"
> ------------------------------------------------------------------------
>
> 1)Is pg_hba.conf's location correct?
> You can check to execute this command.
>
> postgres=# show hba_file;
> hba_file
> -------------------------------
> /home/p843/pgdata/pg_hba.conf
> (1 row)
>
> 2)Did you reload pg_hba.conf?
> If we change pg_hba.conf ,we must execute "pg_ctl reload"
>
> 3)pg_hba.conf may have a trash.
> Can you recreate pg_hba.conf?
> *Don't copy old pg_hba.conf.
>
>
> Thank you.
>
> > On 27/04/2010 11:42, jkunkel@laurcat.com wrote:
> >
> >> I am putting up a new server on version 8.4.3. I copied pg_hba.conf
> >> from a running 8.3.6 system, changing only the public IP address for the
> >> local machine.
> >>
> >> I get the error:
> >> FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres",
> >> database "arc"
> >>
> >> pg_hba.conf contains the line:
> >> host all all 209.159.145.248 255.255.255.255
> >> trust
> >>
> > Would there be a line earlier in the file that matches and is preventing
> > a connection?
> >
> > Ray.
> >
> >
>
>
> --
> ================================================
> Kenichiro Tanaka
> K.K.Ashisuto
> http://www.ashisuto.co.jp/english/index.html
> ================================================
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
Hotmail & Messenger. Get them on your phone now.
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432
> Date: Tue, 27 Apr 2010 21:08:31 +0900
> From: ketanaka@ashisuto.co.jp
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] pg_hba.conf
>
> Hi
>
> >Would there be a line earlier in the file that matches and is preventing
> >a connection?
>
> At first, I think so too.
> But if there is a line earlier in the file ,we get following error.
>
> ------------------------------------------------------------------------
> psql: could not connect to server: Connection refused
> Is the server running on host "192.168.23.132" and accepting
> TCP/IP connections on port 1843?
> ------------------------------------------------------------------------
>
> ex: my pg_hba.conf
> ------------------------------------------------------------------------
> host all all 192.168.23.132 255.255.255.255 deny
> host all all 192.168.23.132 255.255.255.255 trust
> ------------------------------------------------------------------------
>
>
> The Jim's message say pg_hba.conf has no entory.
>
> ------------------------------------------------------------------------
> FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres",
> database "arc"
> ------------------------------------------------------------------------
>
> 1)Is pg_hba.conf's location correct?
> You can check to execute this command.
>
> postgres=# show hba_file;
> hba_file
> -------------------------------
> /home/p843/pgdata/pg_hba.conf
> (1 row)
>
> 2)Did you reload pg_hba.conf?
> If we change pg_hba.conf ,we must execute "pg_ctl reload"
>
> 3)pg_hba.conf may have a trash.
> Can you recreate pg_hba.conf?
> *Don't copy old pg_hba.conf.
>
>
> Thank you.
>
> > On 27/04/2010 11:42, jkunkel@laurcat.com wrote:
> >
> >> I am putting up a new server on version 8.4.3. I copied pg_hba.conf
> >> from a running 8.3.6 system, changing only the public IP address for the
> >> local machine.
> >>
> >> I get the error:
> >> FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres",
> >> database "arc"
> >>
> >> pg_hba.conf contains the line:
> >> host all all 209.159.145.248 255.255.255.255
> >> trust
> >>
> > Would there be a line earlier in the file that matches and is preventing
> > a connection?
> >
> > Ray.
> >
> >
>
>
> --
> ================================================
> Kenichiro Tanaka
> K.K.Ashisuto
> http://www.ashisuto.co.jp/english/index.html
> ================================================
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
Hotmail & Messenger. Get them on your phone now.
On Tue, Apr 27, 2010 at 6:42 AM, <jkunkel@laurcat.com> wrote:
I am putting up a new server on version 8.4.3. I copied pg_hba.conf
from a running 8.3.6 system, changing only the public IP address for the
local machine.
I get the error:
FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres",
database "arc"
pg_hba.conf contains the line:
host all all 209.159.145.248 255.255.255.255
trust
Hmm, just for giggles, does it work using CIDR syntax:
host all all 209.159.145.248/32 trust
?
--Scott
--
Scott Mead
Principal Systems Engineer
EnterpriseDB Corporation
The Enterprise Postgres Company
Scott Mead
Principal Systems Engineer
EnterpriseDB Corporation
The Enterprise Postgres Company
Other records work (I can connect from my remote site using pgAdmin,
just fine), so I know the file is being read by posgres.
Any ideas?
Thanks in advance,
Jim
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
I had a similar problem: older versions of Postgres have IP addressing in
one column and subnetting/mask in the next one. 8.4 uses CIDR expression in
one column - applying CIDR notation solved my problem. I think it's
advisable to manually correct the pg_hba.conf file instead of replacing it
with the old configuration file from the older version of Postgres.
Cheers, Pete
From: Scott Mead <scott.lists@enterprisedb.com>
To: jkunkel@laurcat.com
Cc: postgres help <pgsql-general@postgresql.org>
Date: 28/04/2010 18:41
Subject: Re: [GENERAL] pg_hba.conf
Sent by: pgsql-general-owner@postgresql.org
On Tue, Apr 27, 2010 at 6:42 AM, <jkunkel@laurcat.com> wrote:
I am putting up a new server on version 8.4.3. I copied pg_hba.conf
from a running 8.3.6 system, changing only the public IP address for the
local machine.
I get the error:
FATAL: no pg_hba.conf entry for host "209.159.145.248", user "postgres",
database "arc"
pg_hba.conf contains the line:
host all all 209.159.145.248 255.255.255.255
trust
Hmm, just for giggles, does it work using CIDR syntax:
host all all 209.159.145.248/32 trust
?
--Scott
--
Scott Mead
Principal Systems Engineer
EnterpriseDB Corporation
The Enterprise Postgres Company
Other records work (I can connect from my remote site using pgAdmin,
just fine), so I know the file is being read by posgres.
Any ideas?
Thanks in advance,
Jim
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
This email (and attachments) are confidential and intended for the addressee(s) only. If you are not the intended recipient please notify the sender, delete any copies and do not take action in reliance on it. Any views expressed are the author's and do not represent those of IOP, except where specifically stated. IOP takes reasonable precautions to protect against viruses but accepts no responsibility for loss or damage arising from virus infection. For the protection of IOP's systems and staff emails are scanned automatically.”
Institute of Physics Registered in England under Registration No 293851
Registered Office: 76/78 Portland Place, London W1B 1NT