pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robin Iddon <robin@edesix.com>
To: Leena Puijola <leena.puijola@endero.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: JDBC conncetion fails, please, advise
Date: Sat, 25 Mar 2006 08:07:48 +0000
Message-ID: <4424FA54.2040404@edesix.com> (raw)
In-Reply-To: <AAFD1BEE99B10D4694C8089BF228A227097650@ex2.emcat.com>
References: <AAFD1BEE99B10D4694C8089BF228A227097650@ex2.emcat.com>

Is your client machine on the same machine as the database?

Your pg_hba.conf file needs to have an entry in it that covers your 
client machine.  It's not 100% clear from your post whether you've 
achieved that or not (I think you've added your server to the 
pg_hba.conf, not your client).

So if my server is on 192.168.2.1 and my client is 10.10.10.1 then the 
pg_hba.conf file needs:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# IPv4 non-local connections:
host    all           all        10.10.10.1/32       trust

And the jdbc connect string will be something like
jdbc:postgresql://192.168.2.1/my_database

Can you post your pg_hba.conf file?

Cheers,
Robin


Leena Puijola wrote:

>Hi,
>
>Please can you assist.
>
>I am trying to connect to PostgreSQL via JDBC.
>
>Database version is 8.0.1 and java software version 1.4.2.
>
>
>I have configured the pg_hba.conf file as follows
>
>host  all  all    ip_address/32   trust
>
>
>ip_address is the ip_address of the host holding the database.
>
>
>my connection string to postgres is as 
>'jdbc:postgresql://my_host:5432/my_database'
>
>
>I'm getting the error message:
>
>Connection error has occurred: org.postgresql.util.PSQLException: FATAL: missing or erroneous pg_hba.conf file
>
>
>
>what is the problem? Please, advise.
>
>Regards,
>Leena 
>
>  
>




view thread (2+ messages)

Message-ID: <4424FA54.2040404@edesix.com>
Permalink:  ../4424FA54.2040404@edesix.com/
Also on:    postgresql.org/message-id/4424FA54.2040404@edesix.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: robin@edesix.com, leena.puijola@endero.com
  Subject: Re: JDBC conncetion fails, please, advise
  In-Reply-To: <4424FA54.2040404@edesix.com>
  References: <AAFD1BEE99B10D4694C8089BF228A227097650@ex2.emcat.com> <4424FA54.2040404@edesix.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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