I PoolingClientConnectionManager
using http client to a server hit the individual to use I am trying to set up connections to host
// code that organizes my connection Manenjr and http client
Actiteepiaarm httpParam = httpclient .getParams (); HttpConnectionParams.setSoTimeout (httpParam, SOCKET_TIMEOUT);
HttpConnectionParams.setConnectionTimeout (httpParam, CONN_TIMEOUT); Httpclient.setParams (httpParam); // Run a thread that closes the connection to the new Connection Manager (connManager). Start (); // code which implements my request http post http post = new HTTP post (url); HttpEntity httpEntity = New String Entity (Request, "UTF-8"); HttpPost.setEntity (httpEntity); Accept header encoding = new basic header ("accept-encoding", "jizip, difflet"); HttpPost.setHeader (acceptEncoding); If (contenttype! = Null & Contenttype.equals ("")) {header contentType = new basic header ("content-type", content type); HttpPost.setHeader (contentType); } Input stream inputstream = faucet; LOG.info (data source + url + url + request + request); HttpResponse response = httpclient.execute (httpPost);
This is the reason why we are using pooling connections for http constraints
We are getting this error somewhere:.
target server failed to org.apache.http.NoHttpResponseException response target server org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead (DefaultHttpResponseParser.java:95) org.apache Failed to respond to .http.impl.conn.DefaultHttpResponseParser. ORG (AbstractHttpClientConnection.java:289) organization org.apache.java:62 on org.apache.http.io.AbstractMessageParser.parse (parseHeadPResponseParser.java:62) on Org.apache.http.impl.Abstract.httpClientConnection.receiveResponseHeader In .apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader (defaultClientConnection.java:252) org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader at (ManagedClientConnectionImpl.java191) org.apache.http.protocol.HttpRequestExecutor at Esponse (httpRequestExecutor.java:300) on org.apache.http.impl.client.DefaultRequestDirector.execute (DefaultRequestDirector.java.117) on doReceiveR Org.apache.http.protocol.HttpRequestExecutor.execute (httpXXExtor.Java127). apache.http.impl.client.AbstractHttpClient.execute (AbstractHttpClient.java:906)
Any one central How do you know how to solve?
We are also shutting down the passive connection.
Some may please help.
Perhaps, it is a bug in HttpClient. If you are using HttpClient 4.4, then try to upgrade to 4.4.1. If you want more information, please see. If you can not upgrade, the following links may be useful. Good luck!
No comments:
Post a Comment