Received: from oscar.broadcom.ie (oscar.broadcom.ie [192.107.110.20]) by hub.org (8.8.8/8.7.5) with ESMTP id LAA27869 for ; Mon, 24 Aug 1998 11:44:09 -0400 (EDT) Received: from broadcom.ie (jr@pc68.broadcom.ie [192.107.110.168]) by oscar.broadcom.ie (8.8.8/8.8.8) with ESMTP id QAA29837; Mon, 24 Aug 1998 16:43:16 +0100 (BST) Sender: jr@broadcom.ie Message-ID: <35E1978A.954A4B58@broadcom.ie> Date: Mon, 24 Aug 1998 17:40:42 +0100 From: John Reilly Organization: Broadcom Eireann Research Ltd. X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.1.105 i586) MIME-Version: 1.0 To: "Dr. Herrera" CC: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] JDBC Connection References: <199808241138.NAA02535@diandel.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eric Marsden wrote: > > >>>>> "DrH" == Herrera writes: > > DrH> I am trying to connect to PostgreSQL from Java (JDK 1.1.6) > DrH> under RedHat Linux 5.1 using the JDBC interface. I have > DrH> compiled the driver and tried to run the examples this way: > DrH> > DrH> java -Djdbc.drivers=postgresql.Driver example.basic jdbc:postgresql:prueba > DrH> postgres postgres > DrH> > DrH> where 'prueba' is the name of an existing database. > DrH> But I always get a 'Connection refused' error in > DrH> DriverManager.getConnection("jdbc:postgresql:prueba") > DrH> > DrH> I have modified pg_hba.conf to allow any user on any host > DrH> access to any database but the error still remains. > > Possible solution: have you started the database with the `-i' option > (to allow TCP/IP connections, which are used by the JDBC interface)? > Read the postmaster manual page for more details. Hi, For RedHat5.1 edit /etc/rc.d/init.d/postgresql and add the -i parameter there. "su postgres -c '/usr/bin/postmaster -i -S -D/var/lib/pgsql'" jr -- ----------------------------------------------------------------------------- John Reilly, | Phone: +353 1 6046006 Broadcom Eireann Research Ltd., | Fax: +353 1 6761532 Kestrel House, | Email: jr@broadcom.ie Clanwilliam Place, | Dublin 2, Ireland | -----------------------------------------------------------------------------