Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2BBC5632B45 for ; Tue, 31 Mar 2009 06:05:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 51444-02 for ; Tue, 31 Mar 2009 06:05:48 -0300 (ADT) X-Greylist: delayed 00:33:56.68019 by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 0EF916328FC for ; Tue, 31 Mar 2009 06:05:47 -0300 (ADT) Received: from 219-89-243-186.adsl.xtra.co.nz ([219.89.243.186] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LoZNi-0003WZ-4w; Tue, 31 Mar 2009 21:31:38 +1300 Message-ID: <49D1D4E6.8000709@opencloud.com> Date: Tue, 31 Mar 2009 21:31:34 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Albe Laurenz CC: mauricio.solis.h@gmail.com, pgsql-jdbc@postgresql.org Subject: Re: Problem References: <49CD084B.8000900@gmail.com> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/117 X-Sequence-Number: 19447 Albe Laurenz wrote: > Mauricio Solis wrote: >> I have a problem wiht de driver. >> >> If the IP address of the postgresql server is wrong, then the aplication >> take a lot of time in finish, iven I try to set >> DriverManager.setLoginTimeout(3), but the problem still. >> >> I used a sniffer (tcpdump) and I realiced that my java aplication insist >> in try to connect to the wrong IP. How I can finish the aplication when >> the IP server is wrong ??? > > I don't think that you run into the login timeout here, you rather encounter > a TCP timeout. Before JDBC can connect, a TCP connection must be established. > Since the destination IP address does not exist, your computer is sending > SYN requests that do not receive an answer until the TCP layer "gives up". Yes, but if you set a login timeout the driver will do the connect in a separate thread, so while that thread is indeed blocked waiting for a TCP-level timeout, the main application thread should not remain blocked. Mauricio, do you have a testcase that shows the problem? -O