pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC conncetion fails, please, advise
2+ messages / 2 participants
[nested] [flat]

* JDBC conncetion fails, please, advise
@ 2006-03-24 12:53  Leena Puijola <leena.puijola@endero.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Leena Puijola @ 2006-03-24 12:53 UTC (permalink / raw)
  To: pgsql-admin


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 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: JDBC conncetion fails, please, advise
@ 2006-03-25 08:07  Robin Iddon <robin@edesix.com>
  parent: Leena Puijola <leena.puijola@endero.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Robin Iddon @ 2006-03-25 08:07 UTC (permalink / raw)
  To: Leena Puijola <leena.puijola@endero.com>; +Cc: pgsql-admin

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-03-25 08:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-24 12:53 JDBC conncetion fails, please, advise Leena Puijola <leena.puijola@endero.com>
2006-03-25 08:07 ` Robin Iddon <robin@edesix.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