Re: NO_HTTP_RESPONSE_EXCEPTION
On 18/02/2009, Oleg Kalnichevski wrote: > Joan Balagueró wrote: > > > Hello Oleg, > > > > I've been making some tests about the NoHttpResponseException problem, and > I > > can't find any reason why HC4 gives some random errors with this > exception. > > > > > > Joan > > As I said this is _very_ unlikely to be a problem on the client side > > > > > But I need your opinion about the following. I've made a very simple test > > sending a request to this "problematic" server. This is the code > > (simplified): > > > > long start; > > > > try > > { > > (... Some operations ...) > > start = > Calendar.getInstance().getTimeInMillis(); > > > > this.objHttp.execute(objPost); > > > > (... Some operations ...) > > } > > catch (NoHttpResponseException nhre) { > > System.out.println("Time (ms) = " + > > (Calendar.getInstance().getTimeInMillis() - start)); > > > > nhre.printStackTrace(); } > > > > > > And this is the result in console: > > > > Time (ms) = 2 > > org.apache.http.NoHttpResponseException: The target > server failed to respond > > (...) > > > > > > As you can see, the process just takes 2 ms. since we send the request > until > > we receive the error. With this time of 2ms, my opinion is that the > request > > is not sent and the execute method fails with this exception. > > > > > > I doubt this is the case. NoHttpResponseException can only be thrown by the > HttpResponseParser after a request has been written to the connection > socket. > > > > > Keep in mind that I'm in Barcelona and I'm sending the request to a server > > located in Madrid, and I'm using an ADSL line shared with many other > users. > > > > But I'm not really sure. What do you think about this? > > > > > > I have nothing new to add. The problem is likely to occur because the > connection gets dropped before the server is able to send back a response of > any kind, either due to a problem on the server side, due to a firewall, > ADSL modem issue or whatever. This does not seem to be an issue with > HttpClient code. If you can install a product such as Wireshark, you could use that to record the actual traffic to/from the server. This should help show where the problem is occurring. > Oleg > > > > > > Thanks, > > Joan. > > > > > > -Mensaje original- > > De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: sábado, 07 de > febrero de 2009 14:08 > > Para: HttpClient User Discussion > > Asunto: Re: NO_HTTP_RESPONSE_EXCEPTION > > > > sebb wrote: > > > > > On 06/02/2009, Oleg Kalnichevski wrote: > > > > > > > Joan Balagueró wrote: > > > > > > > > > > > > > Thanks Oleg. It seems strange to me because HttpClient3 (sending > > > > > > > > > > > > > > requests > > > > > > > > > to > > > > > > > > > the same server) never fails. I'll take a look at the code again and > > > > > > > > > > > > > > I'll > > > > > > > > > > > > > > comment you something else. > > > > > > > > > > > > > > > > > > > I do not know why the server chokes on packets generated by > HttpClient > > > > > > > > > 4, > > > > > > > > > but this is clearly a server side problem. The server should return a > non > > > > 2xx response if something is not okay, not just drop the connection. > > > > > > > > HTTP/1.0 can be a problem or absence of User-Agent header. Whatever. > At > > > > > > > > > any > > > > > > > > > rate the server is broken. > > > > > > > > > > > > > > > > > > > > > Just another question. When I modify a connection or response > timeout > > > > > setting another value (for example, from 5000 to 2000) HttpClient4 > > > > > > > > > > > > > > applies > > > > > > > > > > > > > > this new value correctly (as expected, obviously). But not the same > with > > > > > maxConnections. If I set MaxConnections from 100 to 1 using > > > > > ConnManagerParams.setMax
Re: NO_HTTP_RESPONSE_EXCEPTION
Joan Balagueró wrote: Hello Oleg, I've been making some tests about the NoHttpResponseException problem, and I can't find any reason why HC4 gives some random errors with this exception. Joan As I said this is _very_ unlikely to be a problem on the client side But I need your opinion about the following. I've made a very simple test sending a request to this "problematic" server. This is the code (simplified): long start; try { (... Some operations ...) start = Calendar.getInstance().getTimeInMillis(); this.objHttp.execute(objPost); (... Some operations ...) } catch (NoHttpResponseException nhre) { System.out.println("Time (ms) = " + (Calendar.getInstance().getTimeInMillis() - start)); nhre.printStackTrace(); } And this is the result in console: Time (ms) = 2 org.apache.http.NoHttpResponseException: The target server failed to respond (...) As you can see, the process just takes 2 ms. since we send the request until we receive the error. With this time of 2ms, my opinion is that the request is not sent and the execute method fails with this exception. I doubt this is the case. NoHttpResponseException can only be thrown by the HttpResponseParser after a request has been written to the connection socket. Keep in mind that I'm in Barcelona and I'm sending the request to a server located in Madrid, and I'm using an ADSL line shared with many other users. But I'm not really sure. What do you think about this? I have nothing new to add. The problem is likely to occur because the connection gets dropped before the server is able to send back a response of any kind, either due to a problem on the server side, due to a firewall, ADSL modem issue or whatever. This does not seem to be an issue with HttpClient code. Oleg Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: sábado, 07 de febrero de 2009 14:08 Para: HttpClient User Discussion Asunto: Re: NO_HTTP_RESPONSE_EXCEPTION sebb wrote: On 06/02/2009, Oleg Kalnichevski wrote: Joan Balagueró wrote: Thanks Oleg. It seems strange to me because HttpClient3 (sending requests to the same server) never fails. I'll take a look at the code again and I'll comment you something else. I do not know why the server chokes on packets generated by HttpClient 4, but this is clearly a server side problem. The server should return a non 2xx response if something is not okay, not just drop the connection. HTTP/1.0 can be a problem or absence of User-Agent header. Whatever. At any rate the server is broken. Just another question. When I modify a connection or response timeout setting another value (for example, from 5000 to 2000) HttpClient4 applies this new value correctly (as expected, obviously). But not the same with maxConnections. If I set MaxConnections from 100 to 1 using ConnManagerParams.setMaxTotalConnections, then: DefaultHttpClient object --> DefaultParams --> parameters --> http.conn-manager.max-total=1 --> OK! But DefaultHttpClient object --> connManager --> connectionPool --> maxTotalConnections still to 100 --> BAD! And if I send 50 simultaneous request, HttpClient processes all of them even with maxTotalConnections to 1. Is this a bug? Or after "ConnManagerParams.setMaxTotalConnections" I must set the new "param" values to the HttpClient object with "this.objHttp.setParams(set the "params" object with the new value of MaxConnections)"? This happens because the connection manager does not reset the existing connection pools for established routes. One can see this as a bug or a 'feature' as one can look at it from different perspectives. To me this is an expected behavior. MaxTotalConnections parameter is expected to be set at the start up time and to not mutate afterwards. Maybe this could be added to the Javadoc? Opened a JIRA for this issue https://issues.apache.org/jira/browse/HTTPCLIENT-823 Oleg Oleg Thanks, Joan. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
RE: NO_HTTP_RESPONSE_EXCEPTION
Hello Oleg, I've been making some tests about the NoHttpResponseException problem, and I can't find any reason why HC4 gives some random errors with this exception. But I need your opinion about the following. I've made a very simple test sending a request to this "problematic" server. This is the code (simplified): long start; try { (... Some operations ...) start = Calendar.getInstance().getTimeInMillis(); this.objHttp.execute(objPost); (... Some operations ...) } catch (NoHttpResponseException nhre) { System.out.println("Time (ms) = " + (Calendar.getInstance().getTimeInMillis() - start)); nhre.printStackTrace(); } And this is the result in console: Time (ms) = 2 org.apache.http.NoHttpResponseException: The target server failed to respond (...) As you can see, the process just takes 2 ms. since we send the request until we receive the error. With this time of 2ms, my opinion is that the request is not sent and the execute method fails with this exception. Keep in mind that I'm in Barcelona and I'm sending the request to a server located in Madrid, and I'm using an ADSL line shared with many other users. But I'm not really sure. What do you think about this? Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: sábado, 07 de febrero de 2009 14:08 Para: HttpClient User Discussion Asunto: Re: NO_HTTP_RESPONSE_EXCEPTION sebb wrote: > On 06/02/2009, Oleg Kalnichevski wrote: >> Joan Balagueró wrote: >> >>> Thanks Oleg. It seems strange to me because HttpClient3 (sending requests >> to >>> the same server) never fails. I'll take a look at the code again and I'll >>> comment you something else. >>> >>> >> I do not know why the server chokes on packets generated by HttpClient 4, >> but this is clearly a server side problem. The server should return a non >> 2xx response if something is not okay, not just drop the connection. >> >> HTTP/1.0 can be a problem or absence of User-Agent header. Whatever. At any >> rate the server is broken. >> >> >> >>> Just another question. When I modify a connection or response timeout >>> setting another value (for example, from 5000 to 2000) HttpClient4 applies >>> this new value correctly (as expected, obviously). But not the same with >>> maxConnections. If I set MaxConnections from 100 to 1 using >>> ConnManagerParams.setMaxTotalConnections, then: >>> >>> DefaultHttpClient object --> DefaultParams --> parameters --> >>> http.conn-manager.max-total=1 --> OK! >>> >>> But DefaultHttpClient object --> connManager --> connectionPool --> >>> maxTotalConnections still to 100 --> BAD! >>> >>> And if I send 50 simultaneous request, HttpClient processes all of them >> even >>> with maxTotalConnections to 1. >>> >>> Is this a bug? Or after >> "ConnManagerParams.setMaxTotalConnections" I must >>> set the new "param" values to the HttpClient object with >>> "this.objHttp.setParams(set the "params" object with the new value of >>> MaxConnections)"? >>> >>> >> This happens because the connection manager does not reset the existing >> connection pools for established routes. One can see this as a bug or a >> 'feature' as one can look at it from different perspectives. To me this is >> an expected behavior. MaxTotalConnections parameter is expected to be set at >> the start up time and to not mutate afterwards. > > Maybe this could be added to the Javadoc? > Opened a JIRA for this issue https://issues.apache.org/jira/browse/HTTPCLIENT-823 Oleg >> Oleg >> >> >> >>> Thanks, >>> >>> Joan. >>> >>> >>> >> - >> To unsubscribe, e-mail: >> httpclient-users-unsubscr...@hc.apache.org >> For additional commands, e-mail: >> httpclient-users-h...@hc.apache.org >> >> > > - > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: httpclient-users-h...@hc.apache.org > - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: NO_HTTP_RESPONSE_EXCEPTION
Hello, My problem with MaxTotalConnections is the following. My application is similar to a proxy. The user enters a set of rules and, through these rules, my application decides the number of simultaneous requests that it allows to pass to the app servers. And this is done modifying dinamically the maxTotalConnections attribute (as I done with HttpClient 3). If HttpClient 4 cannot modify this attribute dinamically, it'll be impossible for me to migrate from H3 to H4. Fortunately, I've seen that Oleg has opened a new issue to add this functionality to H4 B3. I don't know the opinion of other users, but for me it's essential. For the moment, I'll move back to H3. Thanks for all, Joan. > sebb wrote: >> On 06/02/2009, Oleg Kalnichevski wrote: >>> Joan Balagueró wrote: >>> Thanks Oleg. It seems strange to me because HttpClient3 (sending requests >>> to the same server) never fails. I'll take a look at the code again and I'll comment you something else. >>> I do not know why the server chokes on packets generated by HttpClient >>> 4, >>> but this is clearly a server side problem. The server should return a >>> non >>> 2xx response if something is not okay, not just drop the connection. >>> >>> HTTP/1.0 can be a problem or absence of User-Agent header. Whatever. >>> At any >>> rate the server is broken. >>> >>> >>> Just another question. When I modify a connection or response timeout setting another value (for example, from 5000 to 2000) HttpClient4 applies this new value correctly (as expected, obviously). But not the same with maxConnections. If I set MaxConnections from 100 to 1 using ConnManagerParams.setMaxTotalConnections, then: DefaultHttpClient object --> DefaultParams --> parameters --> http.conn-manager.max-total=1 --> OK! But DefaultHttpClient object --> connManager --> connectionPool --> maxTotalConnections still to 100 --> BAD! And if I send 50 simultaneous request, HttpClient processes all of them >>> even with maxTotalConnections to 1. Is this a bug? Or after >>> "ConnManagerParams.setMaxTotalConnections" I must set the new "param" values to the HttpClient object with "this.objHttp.setParams(set the "params" object with the new value of MaxConnections)"? >>> This happens because the connection manager does not reset the >>> existing >>> connection pools for established routes. One can see this as a bug or a >>> 'feature' as one can look at it from different perspectives. To me this >>> is >>> an expected behavior. MaxTotalConnections parameter is expected to be >>> set at >>> the start up time and to not mutate afterwards. >> >> Maybe this could be added to the Javadoc? >> > > Opened a JIRA for this issue > > https://issues.apache.org/jira/browse/HTTPCLIENT-823 > > Oleg > >>> Oleg >>> >>> >>> Thanks, Joan. >>> - >>> To unsubscribe, e-mail: >>> httpclient-users-unsubscr...@hc.apache.org >>> For additional commands, e-mail: >>> httpclient-users-h...@hc.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org >> For additional commands, e-mail: httpclient-users-h...@hc.apache.org >> > > > - > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: httpclient-users-h...@hc.apache.org > > - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: NO_HTTP_RESPONSE_EXCEPTION
sebb wrote: On 06/02/2009, Oleg Kalnichevski wrote: Joan Balagueró wrote: Thanks Oleg. It seems strange to me because HttpClient3 (sending requests to the same server) never fails. I'll take a look at the code again and I'll comment you something else. I do not know why the server chokes on packets generated by HttpClient 4, but this is clearly a server side problem. The server should return a non 2xx response if something is not okay, not just drop the connection. HTTP/1.0 can be a problem or absence of User-Agent header. Whatever. At any rate the server is broken. Just another question. When I modify a connection or response timeout setting another value (for example, from 5000 to 2000) HttpClient4 applies this new value correctly (as expected, obviously). But not the same with maxConnections. If I set MaxConnections from 100 to 1 using ConnManagerParams.setMaxTotalConnections, then: DefaultHttpClient object --> DefaultParams --> parameters --> http.conn-manager.max-total=1 --> OK! But DefaultHttpClient object --> connManager --> connectionPool --> maxTotalConnections still to 100 --> BAD! And if I send 50 simultaneous request, HttpClient processes all of them even with maxTotalConnections to 1. Is this a bug? Or after "ConnManagerParams.setMaxTotalConnections" I must set the new "param" values to the HttpClient object with "this.objHttp.setParams(set the "params" object with the new value of MaxConnections)"? This happens because the connection manager does not reset the existing connection pools for established routes. One can see this as a bug or a 'feature' as one can look at it from different perspectives. To me this is an expected behavior. MaxTotalConnections parameter is expected to be set at the start up time and to not mutate afterwards. Maybe this could be added to the Javadoc? Opened a JIRA for this issue https://issues.apache.org/jira/browse/HTTPCLIENT-823 Oleg Oleg Thanks, Joan. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: NO_HTTP_RESPONSE_EXCEPTION
On 06/02/2009, Oleg Kalnichevski wrote: > Joan Balagueró wrote: > > > Thanks Oleg. It seems strange to me because HttpClient3 (sending requests > to > > the same server) never fails. I'll take a look at the code again and I'll > > comment you something else. > > > > > > I do not know why the server chokes on packets generated by HttpClient 4, > but this is clearly a server side problem. The server should return a non > 2xx response if something is not okay, not just drop the connection. > > HTTP/1.0 can be a problem or absence of User-Agent header. Whatever. At any > rate the server is broken. > > > > > Just another question. When I modify a connection or response timeout > > setting another value (for example, from 5000 to 2000) HttpClient4 applies > > this new value correctly (as expected, obviously). But not the same with > > maxConnections. If I set MaxConnections from 100 to 1 using > > ConnManagerParams.setMaxTotalConnections, then: > > > > DefaultHttpClient object --> DefaultParams --> parameters --> > > http.conn-manager.max-total=1 --> OK! > > > > But DefaultHttpClient object --> connManager --> connectionPool --> > > maxTotalConnections still to 100 --> BAD! > > > > And if I send 50 simultaneous request, HttpClient processes all of them > even > > with maxTotalConnections to 1. > > > > Is this a bug? Or after > "ConnManagerParams.setMaxTotalConnections" I must > > set the new "param" values to the HttpClient object with > > "this.objHttp.setParams(set the "params" object with the new value of > > MaxConnections)"? > > > > > > This happens because the connection manager does not reset the existing > connection pools for established routes. One can see this as a bug or a > 'feature' as one can look at it from different perspectives. To me this is > an expected behavior. MaxTotalConnections parameter is expected to be set at > the start up time and to not mutate afterwards. Maybe this could be added to the Javadoc? > > Oleg > > > > > Thanks, > > > > Joan. > > > > > > > > - > To unsubscribe, e-mail: > httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: > httpclient-users-h...@hc.apache.org > > - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
Re: NO_HTTP_RESPONSE_EXCEPTION
Joan Balagueró wrote: Thanks Oleg. It seems strange to me because HttpClient3 (sending requests to the same server) never fails. I'll take a look at the code again and I'll comment you something else. I do not know why the server chokes on packets generated by HttpClient 4, but this is clearly a server side problem. The server should return a non 2xx response if something is not okay, not just drop the connection. HTTP/1.0 can be a problem or absence of User-Agent header. Whatever. At any rate the server is broken. Just another question. When I modify a connection or response timeout setting another value (for example, from 5000 to 2000) HttpClient4 applies this new value correctly (as expected, obviously). But not the same with maxConnections. If I set MaxConnections from 100 to 1 using ConnManagerParams.setMaxTotalConnections, then: DefaultHttpClient object --> DefaultParams --> parameters --> http.conn-manager.max-total=1 --> OK! But DefaultHttpClient object --> connManager --> connectionPool --> maxTotalConnections still to 100 --> BAD! And if I send 50 simultaneous request, HttpClient processes all of them even with maxTotalConnections to 1. Is this a bug? Or after "ConnManagerParams.setMaxTotalConnections" I must set the new "param" values to the HttpClient object with "this.objHttp.setParams(set the "params" object with the new value of MaxConnections)"? This happens because the connection manager does not reset the existing connection pools for established routes. One can see this as a bug or a 'feature' as one can look at it from different perspectives. To me this is an expected behavior. MaxTotalConnections parameter is expected to be set at the start up time and to not mutate afterwards. Oleg Thanks, Joan. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
RE: NO_HTTP_RESPONSE_EXCEPTION
Thanks Oleg. It seems strange to me because HttpClient3 (sending requests to the same server) never fails. I'll take a look at the code again and I'll comment you something else. Just another question. When I modify a connection or response timeout setting another value (for example, from 5000 to 2000) HttpClient4 applies this new value correctly (as expected, obviously). But not the same with maxConnections. If I set MaxConnections from 100 to 1 using ConnManagerParams.setMaxTotalConnections, then: DefaultHttpClient object --> DefaultParams --> parameters --> http.conn-manager.max-total=1 --> OK! But DefaultHttpClient object --> connManager --> connectionPool --> maxTotalConnections still to 100 --> BAD! And if I send 50 simultaneous request, HttpClient processes all of them even with maxTotalConnections to 1. Is this a bug? Or after "ConnManagerParams.setMaxTotalConnections" I must set the new "param" values to the HttpClient object with "this.objHttp.setParams(set the "params" object with the new value of MaxConnections)"? Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: viernes, 06 de febrero de 2009 17:34 Para: HttpClient User Discussion Asunto: RE: NO_HTTP_RESPONSE_EXCEPTION On Fri, 2009-02-06 at 13:44 +0100, Joan Balagueró wrote: > Hello Oleg, > > > This is the log. I sent 10 concurrent requests, and all of them failed with > HttpNoResponseException. > > > Thanks for you help, > > Joan. > There is nothing wrong with packets generated by HttpClient. This appears to be a server side issue. The target server fails to send any valid response back and simply closes the connection. Oleg > -Mensaje original- > De: Oleg Kalnichevski [mailto:ol...@apache.org] > Enviado el: jueves, 05 de febrero de 2009 21:44 > Para: HttpClient User Discussion > Asunto: Re: NO_HTTP_RESPONSE_EXCEPTION > > Joan Balagueró wrote: > > Hello, > > > > > > > > Im sending requests to one server using HttpClient3 and HttpClient4. > > > > > > > > HttpClient3 works well, but HttpClient4 fails randomly with an > > HttpNoResponseException. > > > > This is the trace: > > > > > > > > org.apache.http.NoHttpResponseException: The target server failed to > respond > > > > at > > > org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponsePar > > ser.java:85) > > > > at > > > org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.ja > > va:174) > > > > at > > > org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(Abst > > ractHttpClientConnection.java:182) > > > > at > > > org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(Defa > > ultClientConnection.java:235) > > > > at > > > org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(Ab > > stractClientConnAdapter.java:259) > > > > at > > > org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestEx > > ecutor.java:279) > > > > at > > > org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.jav > > a:121) > > > > at > > > org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDir > > ector.java:410) > > > > at > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > > va:555) > > > > at > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > > va:487) > > > > at > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > > va:465) > > > > at > > com.vpfw.proxy.services.http.HttpService.sendRequest(HttpService.java:562) > > > > > > > > Do you know if any other people has had a problem like this? > > > > > > Not to my best knowledge. > > > Set 'org.apache.http' logging category to DEBUG and post the resulting > wire / context log to the list. I'll have a look. > > Oleg > > > > > Thanks, > > > > > > > > Joan. > > > > > > - > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
RE: NO_HTTP_RESPONSE_EXCEPTION
On Fri, 2009-02-06 at 13:44 +0100, Joan Balagueró wrote: > Hello Oleg, > > > This is the log. I sent 10 concurrent requests, and all of them failed with > HttpNoResponseException. > > > Thanks for you help, > > Joan. > There is nothing wrong with packets generated by HttpClient. This appears to be a server side issue. The target server fails to send any valid response back and simply closes the connection. Oleg > -Mensaje original- > De: Oleg Kalnichevski [mailto:ol...@apache.org] > Enviado el: jueves, 05 de febrero de 2009 21:44 > Para: HttpClient User Discussion > Asunto: Re: NO_HTTP_RESPONSE_EXCEPTION > > Joan Balagueró wrote: > > Hello, > > > > > > > > I’m sending requests to one server using HttpClient3 and HttpClient4. > > > > > > > > HttpClient3 works well, but HttpClient4 fails randomly with an > > ‘HttpNoResponseException’. > > > > This is the trace: > > > > > > > > org.apache.http.NoHttpResponseException: The target server failed to > respond > > > > at > > > org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponsePar > > ser.java:85) > > > > at > > > org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.ja > > va:174) > > > > at > > > org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(Abst > > ractHttpClientConnection.java:182) > > > > at > > > org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(Defa > > ultClientConnection.java:235) > > > > at > > > org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(Ab > > stractClientConnAdapter.java:259) > > > > at > > > org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestEx > > ecutor.java:279) > > > > at > > > org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.jav > > a:121) > > > > at > > > org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDir > > ector.java:410) > > > > at > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > > va:555) > > > > at > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > > va:487) > > > > at > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > > va:465) > > > > at > > com.vpfw.proxy.services.http.HttpService.sendRequest(HttpService.java:562) > > > > > > > > Do you know if any other people has had a problem like this? > > > > > > Not to my best knowledge. > > > Set 'org.apache.http' logging category to DEBUG and post the resulting > wire / context log to the list. I'll have a look. > > Oleg > > > > > Thanks, > > > > > > > > Joan. > > > > > > - > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: httpclient-users-h...@hc.apache.org - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org
RE: NO_HTTP_RESPONSE_EXCEPTION
Hello Oleg, This is the log. I sent 10 concurrent requests, and all of them failed with HttpNoResponseException. Thanks for you help, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol...@apache.org] Enviado el: jueves, 05 de febrero de 2009 21:44 Para: HttpClient User Discussion Asunto: Re: NO_HTTP_RESPONSE_EXCEPTION Joan Balagueró wrote: > Hello, > > > > Im sending requests to one server using HttpClient3 and HttpClient4. > > > > HttpClient3 works well, but HttpClient4 fails randomly with an > HttpNoResponseException. > > This is the trace: > > > > org.apache.http.NoHttpResponseException: The target server failed to respond > > at > org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponsePar > ser.java:85) > > at > org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.ja > va:174) > > at > org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(Abst > ractHttpClientConnection.java:182) > > at > org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(Defa > ultClientConnection.java:235) > > at > org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(Ab > stractClientConnAdapter.java:259) > > at > org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestEx > ecutor.java:279) > > at > org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.jav > a:121) > > at > org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDir > ector.java:410) > > at > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > va:555) > > at > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > va:487) > > at > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja > va:465) > > at > com.vpfw.proxy.services.http.HttpService.sendRequest(HttpService.java:562) > > > > Do you know if any other people has had a problem like this? > > Not to my best knowledge. Set 'org.apache.http' logging category to DEBUG and post the resulting wire / context log to the list. I'll have a look. Oleg > > Thanks, > > > > Joan. > > 'http.conn-manager.timeout': 1 'http.conn-manager.timeout': 1 ThreadSafeClientConnManager.getConnection: HttpRoute[{}->http://www.interfaces.transhotel.com], timeout = 1 Total connections kept alive: 10 Total issued connections: 0 Total allocated connection: 10 out of 2147483647 Getting free connection [HttpRoute[{}->http://www.interfaces.transhotel.com]][null] 'http.connection.stalecheck': false 'http.protocol.version': HTTP/1.0 Attempt 1 to execute request >> "POST /interfaces/SController HTTP/1.0[EOL]" >> "Content-Type: text/xml; charset=UTF-8[EOL]" >> "Accept-Encoding: gzip, deflate[EOL]" >> "Content-Length: 250[EOL]" >> "Content-Encoding: UTF-8[EOL]" >> "Host: www.interfaces.transhotel.com[EOL]" >> "Connection: Keep-Alive[EOL]" >> "[EOL]" >> POST /interfaces/SController HTTP/1.0 >> Content-Type: text/xml; charset=UTF-8 >> Accept-Encoding: gzip, deflate >> Content-Length: 250 >> Content-Encoding: UTF-8 >> Host: www.interfaces.transhotel.com >> Connection: Keep-Alive >> "pXML=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22iso-8859-1%22%3F%3E%3CLogin%3E%3CUsername%3EUE57439Lk%3C%2FUsername%3E%3CPassword%3EEZPE3HPGSM%3C%2FPassword%3E%3CLanguage%3ESPA%3C%2FLanguage%3E%3CProduct%3E1%3C%2FProduct%3E%3C%2FLogin%3E&pCall=Login" Connection closed ThreadSafeClientConnManager.getConnection: HttpRoute[{}->http://www.interfaces.transhotel.com], timeout = 1 'http.conn-manager.timeout': 1 Total connections kept alive: 9 ThreadSafeClientConnManager.getConnection: HttpRoute[{}->http://www.interfaces.transhotel.com], timeout = 1 'http.conn-manager.timeout': 1 ThreadSafeClientConnManager.getConnection: HttpRoute[{}->http://www.interfaces.transhotel.com], timeout = 1 Total issued connections: 1 Total allocated connection: 10 out of 2147483647 Getting free connection [HttpRoute[{}->http://www.interfaces.transhotel.com]][null] 'http.connection.stalecheck': false 'http.protocol.version': HTTP/1.0 Attempt 1 to execute request >> "POST /interfaces/SController HTTP/1.0[EOL]" >> "Content-Type: text/xml; charset=UTF-8[EOL]" 'http.conn-manager.timeout': 1 >> "Accept-Encoding: gzip, deflate[EOL]"
Re: NO_HTTP_RESPONSE_EXCEPTION
Joan Balagueró wrote: Hello, I’m sending requests to one server using HttpClient3 and HttpClient4. HttpClient3 works well, but HttpClient4 fails randomly with an ‘HttpNoResponseException’. This is the trace: org.apache.http.NoHttpResponseException: The target server failed to respond at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponsePar ser.java:85) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.ja va:174) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(Abst ractHttpClientConnection.java:182) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(Defa ultClientConnection.java:235) at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(Ab stractClientConnAdapter.java:259) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestEx ecutor.java:279) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.jav a:121) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDir ector.java:410) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja va:555) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja va:487) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja va:465) at com.vpfw.proxy.services.http.HttpService.sendRequest(HttpService.java:562) Do you know if any other people has had a problem like this? Not to my best knowledge. Set 'org.apache.http' logging category to DEBUG and post the resulting wire / context log to the list. I'll have a look. Oleg Thanks, Joan. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org