hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: Operation timed out: connect:could be due to invalid address
Date Fri, 23 Jun 2006 18:53:56 GMT
Hi Eric,

> [6/21/06 11:21:55:467 EDT] 215da05f SystemOut     O 2006-06-21
> 11:21:55,452 DEBUG [Servlet.Engine.Transports : 0]
> httpclient.HttpMethodDirector (HttpMethodDirector.java:442)     -
> Operation timed out: connect:could be due to invalid address
> java.net.SocketException: Operation timed out: connect:could be due to
> invalid address

An important part of an exception is the stack trace.
Please post it.

> We have ruled out the possibility that the customer's server is unable
> to access the remote server by asking our customer to issue a POST
> request using a web browser from the server machine -- the response was
> successful.

Have you verified that HTTPS for HttpClient is correctly set up in
the customer's application server? Did they use HTTPS for issuing
the POST request?

> Has anyone seen this symptom before?  Absolutely *zero* log data from
> the "httpclient.wire" loggers, not even a connection attempt?

The wire logger will only print what is sent over or received
through a connection. If the connect fails, nothing is sent.
Please enable the context logger and post the results:


> Here is the extent of what we are doing with HttpClient, I have added
> comments specific to this email with "//+++":
>        HttpClientParams httpClientParams = new HttpClientParams();
>        httpClientParams.setSoTimeout(HTTP_SOCKET_TIMEOUT_MILLIS);
>        //+++ HTTP_SOCKET_TIMEOUT_MILLIS is set to 60000
>        HttpClient client = new HttpClient(httpClientParams);
>        PostMethod post = new PostMethod(targetUrl);
>        //+++ targetUrl is the https:// URL we are accessing
>        post.addParameters(parameters);
>        //+++ parameters is a NameValuePair[] with about eight variables

You are creating a new HttpClient and implicit SimpleConnectionManager
for every request. If you feel that is the right thing to do, you have
to make sure that the connection manager does not try to keep the
connections alive:

One way to achieve this is to send a "Connection: close" header.


To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org

View raw message