AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Software caused connection abort: recv failed

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
Janwillem Borleffs
Guest





PostPosted: Sun Nov 14, 2004 1:57 pm    Post subject: Software caused connection abort: recv failed Reply with quote



Hello everybody,

Using the following snippet:

<snippet>

System.setProperty("javax.net.ssl.trustStore",
"/var/keystores/somehost.keystore");

// Create a trust manager that does not validate certificate chains
X509TrustManager trustMgr = new X509TrustManager() {
public void checkClientTrusted(
X509Certificate[] arg0, String arg1)
throws CertificateException {
}

public void checkServerTrusted(
X509Certificate[] arg0,String arg1)
throws CertificateException {
}

public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
};

SSLContext context = SSLContext.getInstance("SSL");
context.init(null, new TrustManager[] { trustMgr }, null);
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory());

URL url = new URL("https://somehost/");
URLConnection con = url.openConnection();
con.getInputStream();

</snippet>


I keep getting the following error:

java.net.SocketException: Software caused connection abort: recv failed

I googled for the cause, only to find that many people have the same problem
with nothing conclusive.

Anyone knows what's causing the problem?


TIA,
JW



Back to top
Janwillem Borleffs
Guest





PostPosted: Mon Nov 29, 2004 9:03 pm    Post subject: Re: Software caused connection abort: recv failed Reply with quote



Janwillem Borleffs wrote:
Quote:
I keep getting the following error:

java.net.SocketException: Software caused connection abort: recv
failed
I googled for the cause, only to find that many people have the same
problem with nothing conclusive.

Anyone knows what's causing the problem?


I do now.... Problem fixed.


JW




Back to top
Colin Mackie
Guest





PostPosted: Sun Dec 05, 2004 2:41 pm    Post subject: Re: Software caused connection abort: recv failed Reply with quote



What was the solution?


"Janwillem Borleffs" <jw (AT) jwscripts (DOT) com> wrote

Quote:
Janwillem Borleffs wrote:
I keep getting the following error:

java.net.SocketException: Software caused connection abort: recv
failed
I googled for the cause, only to find that many people have the same
problem with nothing conclusive.

Anyone knows what's causing the problem?


I do now.... Problem fixed.


JW

Back to top
Janwillem Borleffs
Guest





PostPosted: Sat Dec 11, 2004 11:02 am    Post subject: Re: Software caused connection abort: recv failed Reply with quote

Colin Mackie wrote:
Quote:
What was the solution?


The private key was missing, so the certificate chain was sent without any
authentication. After defining the pkcs12 file as the
javax.net.ssl.keyStore, the certificates where applied along with the
private key...


JW




Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.