hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aurelien Pernoud" <apern...@sopragroup.com>
Subject RE: About Bug 14005, HttpMultiClient reusing closed connection, advice needed
Date Thu, 05 Dec 2002 13:34:12 GMT

> De : Adrian Sutton [mailto:adrian.sutton@ephox.com]
> The problem is occurring because the server times out the
> connection so the
> problem is almost always a configuration setting somewhere.
> It may however
> not be a configuration in the server itself, the firewall can
> be configured
> to time out connections as well etc.  My first step in
> debugging any problem
> with HttpClient is to telnet into port 80 of the server
> myself so I can see
> exactly what's going on and get a lot more control.  Enabling
> the http wire
> logs are also good but I find the output of telnet is easier
> to follow and
> lets me change around what's sent a bit more easily.
> Basically though, it will happen on both servers if you leave
> it long enough
> - it's only a matter of time... (queue spooky music).
> Not much more detail I can shed on the situation I'm afraid.

Hi Adrian,

First thanks for your explanation and time. Here are some tests I've made :

UNIX tests : AIX 4.3.3 and AIX 5.1.0.
WIN Tests : win 2000 pro/server only
JDK : 1.3.1 (adapted to the platform)
Webapp server : Tomcat 4.1.12 (adapted to the platform)

I tried many configuration to see what was working, what wasn't.
My app is using httpclient to get streams from other hosts, and for the
moment only local hosts (I never use proxy), and not secure.

First when HttpClient is running under win2000, it *never* goes on broken
pipe, even after 2 days without making any request to another host, may the
distant host be a UNIX or a WIN, or localhost.

When HttpClient is running under UNIX (both AIX systems above have the same
results), here's what happen :

- When making request to localhost (loopback), it goes on broken pipe only
after like 10 sec of inactivity. Very weird, must be some conf inside AIX,
we have to look for this.

- When making requests to a distant WIN system, it works fine for hours, but
crashes after two days of inactivity.

- I haven't tested yet making request from Unix to distant UNIX, but I'll
let you know what happen once done.

I've seen your solution for the moment : try-catch IOException and retry,
but in my mind this is only a hack, cause it nevers happens under WIN
environment. I'm not a socket specialist at all, but I've spent time with
one at work, and he tolds me that they encountered broken pipe in other
projects when using different systems, because systems sometime have their
own way to close a socket. (not sure of my translation in english, sorry)
The socket is not properly closed, here is a state under AIX after only
seconds, and that crashes :

Does anyone have any idea on how to definitely solve this issue, instead of
"hacking" the code to repeat the request if there was a broken pipe ?

Aurélien Pernoud.

View raw message