467,915 Members | 1,190 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Software caused connection abort: recv failed

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(cont ext.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

Jul 17 '05 #1
  • viewed: 49936
Share:
3 Replies
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

Jul 17 '05 #2
What was the solution?
"Janwillem Borleffs" <jw@jwscripts.com> wrote in message news:<41***********************@news.euronet.nl>.. .
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

Jul 17 '05 #3
Colin Mackie wrote:
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

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Robin9876 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.