Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DA1D79F9386 for ; Thu, 1 Feb 2007 11:09:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 10097-04 for ; Thu, 1 Feb 2007 11:09:28 -0400 (AST) X-Greylist: delayed 00:22:25.525594 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 5B1659FB202 for ; Thu, 1 Feb 2007 11:09:28 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.mediagonal.ch (se1.guanaca.ch [194.153.188.157]) by svr4.postgresql.org (Postfix) with ESMTP id 89ED85AFA22 for ; Thu, 1 Feb 2007 14:47:01 +0000 (GMT) Received: from localhost (www1 [127.0.0.1]) by mail.mediagonal.ch (Postfix) with ESMTP id AF8E3EF9E for ; Thu, 1 Feb 2007 15:46:44 +0100 (CET) Received: from mail.mediagonal.ch ([127.0.0.1]) by localhost (mediagonal.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07477-03 for ; Thu, 1 Feb 2007 15:46:44 +0100 (CET) Received: from localhost (www1 [127.0.0.1]) by mail.mediagonal.ch (Postfix) with ESMTP id 95CC9EF94 for ; Thu, 1 Feb 2007 15:46:44 +0100 (CET) MIME-Version: 1.0 Date: Thu, 1 Feb 2007 15:46:44 +0100 From: To: pgsql-jdbc@postgresql.org Subject: jdbc connection problem Message-ID: X-Sender: david@mediagonal.ch User-Agent: RoundCube Webmail/0.1b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by Amavisd at mail.mediagonal.ch X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.097 tagged_above=0 required=5 tests=BAYES_50, FORGED_RCVD_HELO, NO_REAL_NAME X-Spam-Level: * X-Archive-Number: 200702/4 X-Sequence-Number: 16560 hi everybody, i have a problem connecting to postgres using the jdbc driver. took the org.postgresql.test.jdbc2.DriverTest and modified it to use String url = "jdbc:postgresql://localhost/testdb"; String user = "username"; String pass = "password"; i get the exception org.postgresql.util.PSQLException: Connection Refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. however, using psql -h localhost -U username -W and then specifying the password works. so i do not see how this could be a general problem with postgresql listening on the wrong interface or not accepting connections from the local host. btw, i use psql 8.1.4 on ubuntu, jdbc is postgresql-8.1-408.jdbc2.jar any ideas? thanks, david