From: Kris Jurka <books@ejurka.com>
To: Kolli, Kishore <Kishore.Kolli@siemens.com>
Cc: 'pgsql-jdbc@postgresql.org' <pgsql-jdbc@postgresql.org>
Subject: Re: Postgresql 8.0, Tomcat 5.5 postgresql-8.0.309.jdbc3.jar
Date: Tue, 1 Feb 2005 02:15:30 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0502010210380.20950@leary.csoft.net> (raw)
In-Reply-To: <FA432D4D6C2EC1498940A59C494F1538077A2D7E@stca207a.bus.sc.rolm.com>
References: <FA432D4D6C2EC1498940A59C494F1538077A2D7E@stca207a.bus.sc.rolm.com>
On Mon, 31 Jan 2005, Kolli, Kishore wrote:
> I am trying to upgrade a web app running postgres7.3, tomcat 4.1 to the
> above environment. I have installed the new postgres 8.0 port and the
> postgresql as a service under user postgres. I can deploy the application to
> tomcat and everything seems to be running ok until I try to open a database
> session. The program gets kicked out with no exceptions. ( I have the open
> session method sandwiched in a try-catch clause and there is also finally
> segment). As soon as I try to open a db session, the program goes to finally
> clause with no exception thrown and when looked into the postgres log, I see
> the following error message
>
> "2005-02-01 00:23:55 LOG: could not receive data from client: No connection
> could be made because the target machine actively refused it.
> 2005-02-01 00:23:55 LOG: unexpected EOF on client connection"
>
The server code in question (src/backend/libpq/pqcomm.c) explains why
no error is sent to the client. Why the error happens in the first
place is beyond me though.
Kris Jurka
r = secure_read(MyProcPort, PqRecvBuffer + PqRecvLength,
PQ_BUFFER_SIZE - PqRecvLength);
if (r < 0)
{
if (errno == EINTR)
continue; /* Ok if interrupted */
/*
* Careful: an ereport() that tries to write to the client
* would cause recursion to here, leading to stack overflow
* and core dump! This message must go *only* to the
* postmaster log.
*/
ereport(COMMERROR,
(errcode_for_socket_access(),
errmsg("could not receive data from client: %m")));
return EOF;
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, Kishore.Kolli@siemens.com
Subject: Re: Postgresql 8.0, Tomcat 5.5 postgresql-8.0.309.jdbc3.jar
In-Reply-To: <Pine.BSO.4.56.0502010210380.20950@leary.csoft.net>
References: <FA432D4D6C2EC1498940A59C494F1538077A2D7E@stca207a.bus.sc.rolm.com> <Pine.BSO.4.56.0502010210380.20950@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox