You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Sankaraiah G <sa...@infosys.com> on 2008/09/08 11:12:46 UTC

Re: Sending multiple requests over multiple threads - AbderaClient connection getting closed: java.net.SocketException: Software caused connection abort: recv failed

Hi olegk, I am using the AbderaClient for getting the feed urls.
here i am doing like this.
String feedUrl="";// here i am getting the feedUrl.
AbderaClient abderaClient = new AbderaClient();
ClientResponse response = abderaClient.get(feedUrl);

above code is throwing the " java.net.SocketException: Software caused
connection abort: recv failed".
If i am using the multiple threads, i am  getting this exception.If i will
use single thread i am not geting this exception.And also i am not getting
the this exception frequently.Here i am looking for getting the feedUrls for
IBM Lotus Quickr documents/folders/libraries.But some time i am getting this
exception while login itself.
If,I am doing some POC code, i never got this exception.If i am testing my
project i am getting this exception sometime not frequently.
Could you tell me where is the problem, i am providing some piece of code .

Login code:
             AbderaClient abderaClient = new AbderaClient();
            String userName = "Shankar";
	String PASSWORD = "Sankar123"		
            abderaClient.addCredentials(URL, null, null,
	new UsernamePasswordCredentials(userName, PASSWORD));
	abderaClient.usePreemptiveAuthentication(true);
	abderaClient.setMaxConnectionsTotal (5000);
	abderaClient.setMaxConnectionsPerHost(5000);

For getting the Response code:

String feedUrl="";// here i am getting the feedUrl.
AbderaClient abderaClient = new AbderaClient();
ClientResponse response = abderaClient.get(feedUrl);

after getting some respose and after using it i am also closing properly,
(Perfectly i am closing ).
Sometimes for getting the response it is taking arround 10 to 15 seconds,
but some times i am getting Successfull response after 10 to 15
seconds.....sometimes i got the "java.net.SocketException: Software caused
connection abort: recv failed"

Logout Code:

	abderaClient.teardown();
	abderaClient= null;

I am installing IBM Lotus Quickr also same machine.
I am using Abdera-4.0 jars and jdk1.5

Could you help me this is the major perfomace issue.If you want i will send
some more code also.

Thanks,
Sankar.





olegk wrote:
> 
> On Wed, 2008-08-27 at 23:53 -0700, Sankaraiah G wrote:
>> Hi,
>> I am facing the problem for Sending multiple requests over multiple
>> threads
>> - AbderaClient connection getting closed,Here i am using the AbderaClient
>> which is the top of the HttpClient.Can any one help me it is greatfull. i
>> am
>> sending my exception stack trace.
>> Here some times i am not getting this exception, some times i am getting
>> the
>> exception.Could please tell me why it is behaving.
>>  java.net.SocketException: Software caused connection abort: recv failed
> 
> Most likely the connection was dropped by either the target server or a
> some sort of a firewall in between. 
> 
> Oleg
> 
> 
>> 	at java.net.SocketInputStream.socketRead0(Native Method)
>> 	at java.net.SocketInputStream.read(Unknown Source)
>> 	at java.io.BufferedInputStream.fill(Unknown Source)
>> 	at java.io.BufferedInputStream.read(Unknown Source)
>> 	at
>> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
>> 	at
>> org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
>> 	at
>> org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
>> 	at
>> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
>> 	at
>> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
>> 	at
>> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
>> 	at
>> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
>> 	at
>> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
>> 	at
>> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>> 	at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>> 	at
>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
>> 	at
>> org.apache.abdera.protocol.client.AbderaClient.execute(AbderaClient.java:401)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Sending-multiple-requests-over-multiple-threads---AbderaClient-connection-getting-closed%3A-java.net.SocketException%3A-Software-caused-connection-abort%3A-recv-failed-tp19195105p19368454.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


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