Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D273D2E00C1 for ; Sat, 23 Feb 2008 17:58:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 87571-05 for ; Sat, 23 Feb 2008 17:58:32 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by postgresql.org (Postfix) with ESMTP id 4346E2E00F7 for ; Sat, 23 Feb 2008 17:58:37 -0400 (AST) Received: by an-out-0708.google.com with SMTP id c36so202049ana.33 for ; Sat, 23 Feb 2008 13:58:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=0YrquHTNKasVCJoYai19T7oBhifOgrGDBRGQrbkbjrc=; b=iGeql4cZtHJYrJcqlmpCXsSXLTkGh7wqIXXrQVghyO7jvgMEoE5Uutvw4Vndxtjys9fry4SFkhQPpgcnTNl5BTw3Jrt3fQJMfkDv+OSLfxdY0YLqGo7IUmRXnv0/Jvw0Lb7c+VbMBd7RUfxXrPNdFInxHXD941XgnVliW0KxfGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=poxmhWZvaaTVnv04iYCD9+pj/17xw49jo5XRQkDCpTMLVJtOIrIAqvwNG/imHaeRh9X/6eQ4cu01jaHoMpTbt52CbfaQFkfMFPnZbAw+Yuzza0C4+OwsZbPojPkMDf4SEDYEKfZ/pXUJ4qWBGgEdAcjLRPecdOVsOqOiSvSuFDE= Received: by 10.100.209.11 with SMTP id h11mr2209428ang.102.1203803916399; Sat, 23 Feb 2008 13:58:36 -0800 (PST) Received: by 10.100.168.5 with HTTP; Sat, 23 Feb 2008 13:58:36 -0800 (PST) Message-ID: <9fb413bd0802231358j3623743h10c35da980d6cb8c@mail.gmail.com> Date: Sat, 23 Feb 2008 22:58:36 +0100 From: "Agustin CS" To: pgsql-jdbc@postgresql.org Subject: Re: Problem executing remote SELECT's (through internet) with JDBC In-Reply-To: <9fb413bd0802220853j8a213e8gcbb471391d4988f0@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3829_806220.1203803916380" References: <9fb413bd0802220252g130e6a62v1df36db15b691419@mail.gmail.com> <47BEB62A.7000009@opencloud.com> <9fb413bd0802220853j8a213e8gcbb471391d4988f0@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200802/189 X-Sequence-Number: 18396 ------=_Part_3829_806220.1203803916380 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I found the source of the problem... The database server is behind a router and any configuration parameter in that router close the communication between client and server. Thanks 2008/2/22, Agustin CS : > > > You may want to re-run with logLevel=2 as a connection parameter; then > > the driver will log all the network I/O it is doing. > > > > Here is the debug output that we get when running the SELECT statement > from the first post. > JDBC driver used: 8.3-603 JDBC3 > Java Virtual Machine used: sun-java-1.5.0.11 > Platform used: Kubuntu 7.04 > > ------------------------ > > 17:02:29.152 (1) PostgreSQL 8.3 JDBC3 with SSL (build 603) > 17:02:29.167 (1) Trying to establish a protocol version 3 connection to > XXX.XXX.XXX.XXX:5432 > 17:02:29.281 (1) FE=> StartupPacket(user=userdb, > database=database_example, client_encoding=UNICODE, DateStyle=ISO, > extra_float_digits=2) > 17:02:29.384 (1) <=BE AuthenticationReqPassword > 17:02:29.386 (1) FE=> Password(password=) > 17:02:29.489 (1) <=BE AuthenticationOk > 17:02:29.524 (1) <=BE ParameterStatus(client_encoding = UNICODE) > 17:02:29.525 (1) <=BE ParameterStatus(DateStyle = ISO, DMY) > 17:02:29.525 (1) <=BE ParameterStatus(integer_datetimes = on) > 17:02:29.525 (1) <=BE ParameterStatus(is_superuser = off) > 17:02:29.525 (1) <=BE ParameterStatus(server_encoding = SQL_ASCII) > 17:02:29.525 (1) <=BE ParameterStatus(server_version = 8.2.6) > 17:02:29.525 (1) <=BE ParameterStatus(session_authorization = userdb) > 17:02:29.526 (1) <=BE ParameterStatus(standard_conforming_strings = off) > 17:02:29.526 (1) <=BE ParameterStatus(TimeZone = localtime) > 17:02:29.526 (1) <=BE BackendKeyData(pid=16418,ckey=140210510) > 17:02:29.526 (1) <=BE ReadyForQuery(I) > 17:02:29.526 (1) compatible = 8.3 > 17:02:29.528 (1) loglevel = 2 > 17:02:29.529 (1) prepare threshold = 5 > getConnection returning driver[className=org.postgresql.Driver, > org.postgresql.Driver@c17164] > 17:02:29.637 (1) simple execute, handler= > org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@1ca318a, > maxRows=0, fetchSize=0, flags=17 > 17:02:29.641 (1) FE=> Parse(stmt=null,query="SELECT * FROM table1 ORDER > BY field1",oids={}) > 17:02:29.643 (1) FE=> Bind(stmt=null,portal=null) > 17:02:29.643 (1) FE=> Describe(portal=null) > 17:02:29.644 (1) FE=> Execute(portal=null,limit=0) > 17:02:29.645 (1) FE=> Sync > 17:02:29.763 (1) <=BE ParseComplete [null] > 17:02:29.765 (1) <=BE BindComplete [null] > 17:02:29.767 (1) <=BE RowDescription(1) > 17:02:29.769 (1) <=BE DataRow > 17:02:29.769 (1) <=BE DataRow > 17:02:29.769 (1) <=BE DataRow > 17:02:29.769 (1) <=BE DataRow > ------=_Part_3829_806220.1203803916380 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I found the source of the problem... The database server is behind a router and any configuration parameter in that router close the
communication between client and server.

Thanks


2008/2/22, Agustin CS <agustincs1@gmail.com>:

You may want to re-run with logLevel=2 as a connection parameter; then
the driver will log all the network I/O it is doing.


Here is the debug output that we get when running the SELECT statement from the first post.
JDBC driver used: 8.3-603 JDBC3
Java Virtual Machine used: sun-java-1.5.0.11
Platform used: Kubuntu 7.04

------------------------

17:02:29.152 (1) PostgreSQL 8.3 JDBC3 with SSL (build 603)
17:02:29.167 (1) Trying to establish a protocol version 3 connection to XXX.XXX.XXX.XXX:5432
17:02:29.281 (1)  FE=> StartupPacket(user=userdb, database=database_example, client_encoding=UNICODE, DateStyle=ISO, extra_float_digits=2)
17:02:29.384 (1)  <=BE AuthenticationReqPassword
17:02:29.386 (1)  FE=> Password(password=<not shown>)
17:02:29.489 (1)  <=BE AuthenticationOk
17:02:29.524 (1)  <=BE ParameterStatus(client_encoding = UNICODE)
17:02:29.525 (1)  <=BE ParameterStatus(DateStyle = ISO, DMY)
17:02:29.525 (1)  <=BE ParameterStatus(integer_datetimes = on)
17:02:29.525 (1)  <=BE ParameterStatus(is_superuser = off)
17:02:29.525 (1)  <=BE ParameterStatus(server_encoding = SQL_ASCII)
17:02:29.525 (1)  <=BE ParameterStatus(server_version = 8.2.6)
17:02:29.525 (1)  <=BE ParameterStatus(session_authorization = userdb)
17:02:29.526 (1)  <=BE ParameterStatus(standard_conforming_strings = off)
17:02:29.526 (1)  <=BE ParameterStatus(TimeZone = localtime)
17:02:29.526 (1)  <=BE BackendKeyData(pid=16418,ckey=140210510)
17:02:29.526 (1)  <=BE ReadyForQuery(I)
17:02:29.526 (1)     compatible = 8.3
17:02:29.528 (1)     loglevel = 2
17:02:29.529 (1)     prepare threshold = 5
getConnection returning driver[className=org.postgresql.Driver,org.postgresql.Driver@c17164]
17:02:29.637 (1) simple execute, handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler@1ca318a, maxRows=0, fetchSize=0, flags=17
17:02:29.641 (1)  FE=> Parse(stmt=null,query="SELECT * FROM table1 ORDER BY field1",oids={})
17:02:29.643 (1)  FE=> Bind(stmt=null,portal=null)
17:02:29.643 (1)  FE=> Describe(portal=null)
17:02:29.644 (1)  FE=> Execute(portal=null,limit=0)
17:02:29.645 (1)  FE=> Sync
17:02:29.763 (1)  <=BE ParseComplete [null]
17:02:29.765 (1)  <=BE BindComplete [null]
17:02:29.767 (1)  <=BE RowDescription(1)
17:02:29.769 (1)  <=BE DataRow
17:02:29.769 (1)  <=BE DataRow
17:02:29.769 (1)  <=BE DataRow
17:02:29.769 (1)  <=BE DataRow

------=_Part_3829_806220.1203803916380--