Received: from hermes.pressenter.com (hermes.pressenter.com [209.224.20.19]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA69845 for ; Tue, 29 Feb 2000 23:13:32 -0500 (EST) (envelope-from jcollins@cs.umn.edu) Received: from [209.224.33.144] (helo=cs.umn.edu) by hermes.pressenter.com with esmtp (Exim 2.05 #1) id 12Q0Vu-0006Sh-00 for pgsql-interfaces@postgresql.org; Tue, 29 Feb 2000 22:13:31 -0600 Sender: collins@pressenter.com Message-ID: <38BC98BC.76205B9B@cs.umn.edu> Date: Tue, 29 Feb 2000 22:12:44 -0600 From: John Collins Organization: J. E. Collins & Associates X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: JDBC connection refused Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have Postgresql set up, and I can access it with jdbc or pgaccess locally, and with pgaccess from another linux box on the same local net. However, I can't get a connection with jdbc across the net. The relevant code is public static void main (String[] args) { try { Class.forName("postgresql.Driver"); Connection con = DriverManager.getConnection("jdbc:postgresql://birch/auction", "collins", ""); // Do something useful here Statement stmt = con.createStatement(); .... and the error message is Connection refused. Check that the hostname and port is correct, and that the postmaster is running with the -i flag, which enables TCP/IP networking. at postgresql.Connection.openConnection(Connection.java, Compiled Code) at postgresql.Driver.connect(Driver.java, Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code) .... Here's what I've checked: - postmaster is indeed being run with the -i flag. I think neither the local jdbc or the remote pgaccess would work otherwise. - I've used every name I can think of, including the ip address, in the URL above. I've used the port and I've not used the port. - I've used netstat to check that postmaster is indeed listening on 5432 I'm stumped. Thanks in advance for any assistance. John Collins University of Minnesota