X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 445DD9DCD53 for ; Sat, 25 Mar 2006 04:07:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77220-09 for ; Sat, 25 Mar 2006 04:07:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from astro.systems.pipex.net (astro.systems.pipex.net [62.241.163.6]) by postgresql.org (Postfix) with ESMTP id 15DC39DCD6D for ; Sat, 25 Mar 2006 04:07:50 -0400 (AST) Received: from flange.edesix.com (81-86-64-236.dsl.pipex.com [81.86.64.236]) by astro.systems.pipex.net (Postfix) with ESMTP id 9047FE00027D; Sat, 25 Mar 2006 08:07:49 +0000 (GMT) Received: from host86-131-245-51.range86-131.btcentralplus.com ([86.131.245.51] helo=[192.168.101.208]) by flange.edesix.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.50) id 1FN3oL-0005MV-B6; Sat, 25 Mar 2006 08:07:49 +0000 Message-ID: <4424FA54.2040404@edesix.com> Date: Sat, 25 Mar 2006 08:07:48 +0000 From: Robin Iddon User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Leena Puijola CC: pgsql-admin@postgresql.org Subject: Re: JDBC conncetion fails, please, advise References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.12 required=5 tests=[AWL=0.120] X-Spam-Score: 0.12 X-Spam-Level: X-Archive-Number: 200603/255 X-Sequence-Number: 21012 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 > > >